Home >Backend Development >PHP Problem >How to install curl extension in php under ubuntu?

How to install curl extension in php under ubuntu?

青灯夜游
青灯夜游Original
2020-09-29 11:24:353375browse

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.

How to install curl extension in php under ubuntu?

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:

php training

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn