Home  >  Article  >  Backend Development  >  What should I do if pecl php cannot be found?

What should I do if pecl php cannot be found?

藏色散人
藏色散人Original
2022-11-14 10:39:291608browse

The solution to the problem that pecl php cannot be found: 1. Open the command window; 2. Check the problem of installing the php extension through pecl; 3. Change it to the correct installation instruction. The installation statement is such as "yum install php -pear php-devel pecl install swoole".

What should I do if pecl php cannot be found?

The operating environment of this tutorial: CentOS 7.2 system, PHP version 8.1, Dell G3 computer.

What should I do if pecl php cannot be found?

Install php extension through pecl, no solution for pecl command found

Take installing swoole as an example:

#Ubuntu/Debian上是这样(php-pear包含pecl,php5-dev包含phpize,pecl依赖phpize)
apt-get install php-pear php5-dev
pecl install swoole
 
#CentOS/Redhat上应该是这样
yum install php-pear php-devel
pecl install swoole
 
#如果是自行编译的PHP(假设安装目录为/opt/php/7.0)
/opt/php/7.0/bin/phpize
/opt/php/7.0/bin/pecl

Recommended learning: "PHP Video Tutorial

The above is the detailed content of What should I do if pecl php cannot be found?. 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