在 php 7 (ubuntu14.04) 中安装 cURL

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37457836/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 01:14:35  来源:igfitidea点击:

install cURL in php 7 (ubuntu14.04)

phpubuntucurl

提问by Monal Soft

I have php7installed on ubuntu 14.04

我已经php7安装在ubuntu 14.04

I have problems with curlI tried to run composer installand it gives me error Your requirements could not be resolved to an installable set of packages.

curl尝试运行时遇到问题,composer install它给了我错误您的要求无法解析为一组可安装的软件包。

Problem 1 - stripe/stripe-php v2.3.0 requires ext-curl *-> the requested PHP extension curl is missing from your system.

问题 1 - stripe/stripe-php v2.3.0 requires ext-curl *-> 系统中缺少请求的 PHP 扩展 curl。

I also tried sudo apt-get install php-curl. This gives me output:

我也试过了sudo apt-get install php-curl。这给了我输出:

E: Unable to locate package php-curl

E: 无法定位包 php-curl

Help

帮助

回答by Swapnil

Try using:

尝试使用:

 sudo apt-get install php7.0-curl

回答by jhuguz

Installing php 7 curlin kali linuxIf you installed your php7manually, Open your terminal and simply type sudo apt-get install php-curlwithout quotes and you are done.

安装php 7 curlkali linux如果你安装了php7手动,打开你的终端只需键入 sudo apt-get install php-curl不带引号,和你做。

I experienced the same problem when installing stripe paymentsystem but that solved my problem.

我在安装stripe payment系统时遇到了同样的问题,但这解决了我的问题。

回答by Bikram Pahi

Follow these steps:

按着这些次序:

  1. Install cURL:
  1. 安装卷曲:

sudo apt-get install php-curlOR sudo apt-get install php7.0-curl

sudo apt-get install php-curl或者 sudo apt-get install php7.0-curl

  1. Enable cURL extension in php.inifile. ;extension=php_curl.dllUncomment this.
  1. php.ini文件中启用 cURL 扩展。;extension=php_curl.dll取消注释。

All done, Cheers!

全部完成,干杯!