cURL is NOT installed in your PHP installation?

May 21, 2014 110.6k views
Hello I have a droplet that is running WordPress on Ubuntu 13.10 and I installed a WordPress plugin give this "cURL is NOT installed in your PHP installation" what do I need to do? Thank you
1 comment
18 Answers

Open SSH

  1. First Install CURL by typing sudo apt-get install curl
  2. Then Restart Apache by typing sudo service apache2 restart
  3. Then Install PHP5 CURL by typing sudo apt-get install php5-curl
  4. will prompt to install... type y or yes!
  5. Then Restart Apache by typing sudo service apache2 restart Done!

Now you should be fine!

  • Thank you very much sir! It worked perfectly :)

  • This answer is the most detailed that will walk non-developers step by step to install php curl. I wish all of the questions have answers like this.

    Thanks a bunch ltdxdtl.

    • Thank you & I agree. I'm a non-developer also but having clear documentation like this goes a long way for anyone. thanks for the kind words!

  • Thank you. It worked perfectly

  • This worked great, thanks!

  • Hi, when I run sudo apt-get install php5-curl I'm getting these errors

    root@myserver:~# sudo apt-get install php5-curl
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
      php5-curl
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 27.3 kB of archives.
    After this operation, 142 kB of additional disk space will be used.
    Err http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main php5-curl amd64       5.5.9+dfsg-1ubuntu4.17
      404  Not Found [IP: 192.241.164.26 80]
    Err http://security.ubuntu.com/ubuntu/ trusty-security/main php5-curl amd64 5.5.      9+dfsg-1ubuntu4.17
      404  Not Found [IP: 91.189.88.149 80]
    E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-curl_      5.5.9+dfsg-1ubuntu4.17_amd64.deb  404  Not Found [IP: 91.189.88.149 80]
    
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    
    

    Can you help?

  • ^ Thank you again. This fix still works. :)

It works, but i need to restart apache

 sudo apt-get intall php5-curl

/etc/init.d/apache2 restart

if you upgraded to php 7.0, make sure to use;

sudo apt-get install php7.0-curl

instead of ...

sudo apt-get install php5-curl

To make it work with php I think you need php5-curl. Try this
 sudo apt-get intall php5-curl
It can be installed with:


sudo apt-get install curl
hmmmm......Andrew I put in the command but it gave me this error

"Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
"Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?"


Marinos Sianios I put in yours but gave me "Invalid operation intall"
Please need to solve this....
The "Invalid operation intall" error is just a typo, so it should be:


sudo apt-get install php5-curl


Sorry for the typo, nice to know that it works!

It works,

sudo apt-get install php5-curl

sudo service apache2 restart

  • I needed to first run "sudo apt-get update" before the installation command (which restarted apache2 itself). Works now.

Thanks a Lot. Very crisp answer. thanks

It says: "sudo service apache2 restart" is unrecognized. What do I do?

someone please help me where do i input these commands ?

Curl was installed

which curl
# => /usr/bin/curl

I run php5.6

php --version
# => PHP 5.6.31-4+ubuntu14.04.1+deb.sury.org+4 (cli)

I needed to run

apt-get install php5.6-curl
service apache2 restart
Have another answer? Share your knowledge.