How to install php-curl in Ubuntu 16.04

帅比萌擦擦* 提交于 2019-11-27 17:48:38
Govind Samrow

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:

  • PHP 7.2: sudo apt-get install php7.2-curl
  • PHP 7.1: sudo apt-get install php7.1-curl
  • PHP 7.0: sudo apt-get install php7.0-curl
  • PHP 5.6: sudo apt-get install php5.6-curl
  • PHP 5.5: sudo apt-get install php5.5-curl

This worked for me.

sudo apt-get install php-curl

This works for me:

sudo apt-get install php5.6-curl
Guillermo Hernández

Do:

apt-get update

And then:

apt-get install php5-curl
Khalid Bin Huda

To Install cURL 7.49.0 on Ubuntu 16.04 and Derivatives

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
Linuxian
sudo apt-get install php5.6-curl

and restart the web browser.

You can check the modules by running php -m | grep curl

For Ubuntu 18.04 or PHP 7.2 users you can do:

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!