Home > Operation and Maintenance > CentOS > What should I do if the pear command cannot be used in centos?

What should I do if the pear command cannot be used in centos?

WBOY
Release: 2022-04-14 14:49:26
Original
3064 people have browsed it

Method: 1. Use "yum install php-devel php-pear httpd-devel" to install PHP and apache for development development; 2. Use "wget ​​http://pear.php.net/go-pear" Download the "go-pear" script.

What should I do if the pear command cannot be used in centos?

The operating environment of this article: centos 7 system, Dell G3 computer.

What to do if the pear command cannot be used in centos

1. This problem occurs because the extension development of php is not installed. It is recommended to install both php and apache development. Use the following Order.

yum install php-devel php-pear httpd-devel
Copy after login

2. It means that you did not compile pear when installing php, so you had to go to the official website http://pear.php.net.

Officially provides two ways to install pear:

1. Add the pear configuration module when compiling PHP.

2. go-pear method.

I tried the go-pear method.

Download go-pear script

wget http://pear.php.net/go-pear
Copy after login

Rename:

mv go-pear go-pear.php
Copy after login

Execute script

php go-pear.php
Copy after login

Recommended tutorial: "centos tutorial"

The above is the detailed content of What should I do if the pear command cannot be used in centos?. 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