在 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
install cURL in php 7 (ubuntu14.04)
提问by Monal Soft
I have php7
installed on ubuntu 14.04
我已经php7
安装在ubuntu 14.04
I have problems with curl
I tried to run composer install
and 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 curl
in kali linux
If you installed your php7
manually,
Open your terminal and simply type
sudo apt-get install php-curl
without quotes and you are done.
安装php 7 curl
在kali linux
如果你安装了php7
手动,打开你的终端只需键入
sudo apt-get install php-curl
不带引号,和你做。
I experienced the same problem when installing stripe payment
system but that solved my problem.
我在安装stripe payment
系统时遇到了同样的问题,但这解决了我的问题。
回答by Bikram Pahi
Follow these steps:
按着这些次序:
- Install cURL:
- 安装卷曲:
sudo apt-get install php-curl
OR sudo apt-get install php7.0-curl
sudo apt-get install php-curl
或者 sudo apt-get install php7.0-curl
- Enable cURL extension in
php.ini
file.;extension=php_curl.dll
Uncomment this.
- 在
php.ini
文件中启用 cURL 扩展。;extension=php_curl.dll
取消注释。
All done, Cheers!
全部完成,干杯!