Method 1
Enable cURL:
- If cURL is not enabled, you'll need to enable it. Depending on your hosting environment, you might have access to modify the PHP configuration file (php.ini) or use a control panel to enable the cURL extension.
- a. If you have access to the php.ini file, find and uncomment the line containing extension=curl, removing the semicolon (;) at the beginning of the line if present. After making this change, save the file and restart your web server.
- b. If you don't have direct access to the php.ini file, check if your hosting provider or server administrator offers a control panel (e.g., cPanel, Plesk, etc.) where you can enable the cURL extension.
Method 2
In Ubuntu, you can install the cURL package using the package manager called apt. Here's the step-by-step guide to install cURL on Ubuntu:
Apply following steps
bashsudo apt update
bashsudo apt install curl
bashcurl --version
Method 3
bashsudo apt install php-curl