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
WBOYOriginal
2022-04-14 14:49:263062browse

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

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

Rename:

mv go-pear go-pear.php

Execute script

php go-pear.php

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!

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