Maybe you have just finished installing Apache and PHP on Ubuntu, and some of your scripts using cURL won't work. The solution is obviously to install cURL for PHP – to do that, all you have to do is type the below command in the terminal.
sudo apt-get install php5-curl
After installing cURL, you should also restart Apache to make it work.
sudo service apache2 restart
A common error message when cURL is not installed on the server is something like the below:
Call to undefined function curl_init() in blah/blah/blah on line xx
How to install cURL from terminal
The below video shows how to install cURL as done in this tutorial.