How to install php-curl in Ubuntu 16.04
In Ubuntu 16.04 default PHP version is 7.0, if you want to use different version then you need to install PHP package according to PHP version:
- PHP 7.4:
sudo apt-get install php7.4-curl
- PHP 7.3:
sudo apt-get install php7.3-curl
- PHP 7.2:
sudo apt-get install php7.2-curl
- PHP 7.1:
sudo apt-get install php7.1-curl
- PHP 7.0:
sudo apt-get install php7.0-curl
- PHP 5.6:
sudo apt-get install php5.6-curl
- PHP 5.5:
sudo apt-get install php5.5-curl
How do I install the ext-curl extension with PHP 7?
Well I was able to install it by :
sudo apt-get install php-curl
on my system. This will install a dependency package, which depends on the default php version.
After that restart apache
sudo service apache2 restart
How can I enable cURL for an installed Ubuntu LAMP stack?
From Install Curl Extension for PHP in Ubuntu:
sudo apt-get install php5-curl
After installing libcurl, you should restart the web server with one of the following commands,
sudo /etc/init.d/apache2 restart
or
sudo service apache2 restart
Related Topics
Add Extra Meta for Orders in Woocommerce
How to Sort an Array of Utf-8 Strings
How to Use Open Id as Login System
Shorthand for Arrays: Is There a Literal Syntax Like {} or []
Automatic Image Format Detection in PHP
Is There a Biginteger Class in PHP
Convert Invalid JSON into Valid JSON
How to Use Objects from Other Namespaces and How to Import Namespaces in PHP
Remove .PHP Extension with PHP
PHP - Split String in Key/Value Pairs
Get Element by Classname with Domdocument() Method
How to Generate Random 64-Bit Value as Decimal String in PHP
Convert All Types of Smart Quotes with PHP