Check which version of PHP uses apache using the phpinfo();function.
Verification is important because for some reason you could upgrade to a lower version (as it was in my case).
Now from the command line run this command to install curl
*(Don\'t copy this) sudo apt-get install php[version of php]-curl*
For example, if it's 5.6 , use
sudo apt-get install php5.6-curl
apache2
sudo service apache2 restart