[英]How to install php-curl in Ubuntu 16.04
Upgraded to Ubuntu 16.04
and facing problem after installing PHP5
.升级到
Ubuntu 16.04
并在安装PHP5
后Ubuntu 16.04
问题。
Installed PHP-5 with following:安装 PHP-5 如下:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5.5 # for PHP 5.5
Trying to install php-curl but its not working.试图安装 php-curl 但它不起作用。
sudo apt-get install php5-curl
Error: E: Unable to locate package php5-curl
错误:E:无法定位包 php5-curl
In Ubuntu 16.04 default PHP version is 7.0, if you want to use different version then you need to install PHP package according to PHP version:在 Ubuntu 16.04 默认的 PHP 版本是 7.0,如果你想使用不同的版本,那么你需要根据 PHP 版本安装 PHP 包:
sudo apt-get install php7.4-curl
sudo apt-get install php7.4-curl
sudo apt-get install php7.3-curl
sudo apt-get install php7.3-curl
sudo apt-get install php7.2-curl
sudo apt-get install php7.2-curl
sudo apt-get install php7.1-curl
sudo apt-get install php7.1-curl
sudo apt-get install php7.0-curl
sudo apt-get install php7.0-curl
sudo apt-get install php5.6-curl
sudo apt-get install php5.6-curl
sudo apt-get install php5.5-curl
sudo apt-get install php5.5-curl
这对我有用。
sudo apt-get install php-curl
这对我有用:
sudo apt-get install php5.6-curl
Do:做:
apt-get update
And then:接着:
apt-get install php5-curl
To Install cURL 7.49.0 on Ubuntu 16.04 and Derivatives在 Ubuntu 16.04 和衍生版本上安装 cURL 7.49.0
wget http://curl.haxx.se/download/curl-7.49.0.tar.gz
tar -xvf curl-7.49.0.tar.gz
cd curl-7.49.0/
./configure
make
sudo make install
For Ubuntu 18.04 or PHP 7.2 users you can do:对于 Ubuntu 18.04 或 PHP 7.2 用户,您可以执行以下操作:
apt-get install php7.2-curl
You can check your PHP version by running php -v
to verify your PHP version and get the right curl version.您可以通过运行
php -v
来检查您的 PHP 版本,以验证您的 PHP 版本并获得正确的 curl 版本。
sudo apt-get install php5.6-curl
and restart the web browser.并重新启动网络浏览器。
You can check the modules by running php -m | grep curl
您可以通过运行
php -m | grep curl
检查模块php -m | grep curl
php -m | grep curl
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php8.0-curl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.