On old versions of Debian and Ubuntu, you solved this by installing the Curl extension for PHP, and restarting the webserver. Assuming the webserver is Apache 2:
sudo apt-get install php5-curl
sudo service apache2 restart
On newer versions, the package name as changed:
sudo apt install php-curl
It’s possible you’ll need to install more:
sudo apt-get install curl libcurl3 libcurl3-dev;