Home >Backend Development >PHP Problem >How to install curl extension in php under ubuntu?
How to install the curl extension in PHP under Ubuntu: 1. Open the terminal and enter the "apt-cache search curl | grep php" command to query the supported curl extension name; 2. Enter "apt-get install curl extension ” command to install.
Recommended: "PHP Video Tutorial"
Find Package
apt-cache is an apt package management tool under Linux. It can query the apt binary package cache file. Most of the information query functions of APT package management can be implemented by the apt-cache command. Through the apt-cache command and the use of different subcommands and parameters, functions such as searching and displaying software package information and package dependencies can be realized.
apt-cache search curl | grep php
Query the name of the supported curl extension
Possible output:
php5-curl - CURL module for php5
Installation
apt-get install php5-curl
Restart
service php5-fpm restart
Verification
##Related recommendations:The above is the detailed content of How to install curl extension in php under ubuntu?. For more information, please follow other related articles on the PHP Chinese website!