How to install curl extension in php under ubuntu?

青灯夜游
Release: 2023-03-06 09:54:02
Original
3314 people have browsed it

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
Copy after login

Query the name of the supported curl extension

Possible output:

php5-curl - CURL module for php5
Copy after login

Installation

apt-get install php5-curl
Copy after login

Restart

service php5-fpm restart
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!