I want to use the pecl command in php7.2.

Asked 2 years ago, Updated 2 years ago, 73 views

 sudo yum-y update
sudo yum install-y\
    curl\
    git\
    libxml2\
    libxml2-develop\
    httpd\
    mysql\
    gcc\
    vim\
    mod_ssl
sudo get https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudorpm-ivhepel-release-latest-7.noarch.rpm
sudo yum install-y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
sudo yum-config-manager -- enable remi-php72
sudo yum install-y\
    php72\
    php72-php\
    php72-php-develop\
    php72-php-mbstring\
    php72-php-opcache\
    php72-php-soap\
    php72-php-mysqlnd\
    php72-php-pear

I installed php72-php-pear on AmazonLinux2 as above, but they told me that there was no pecl command, so I didn't even have pecl7 or pecl72.
What should I do if I want to use the pecl command?

php amazon-linux

2022-09-30 17:10

2 Answers

I don't know why, but pecl doesn't seem to be created in /usr/bin/.

The php72-php-pear package is Software Collections, /opt/remi/php72/ and the PECL itself exists in /opt/remi/php72/root/p/pecode>.

It's a workaround, but if you use this pecl, it will work for the time being.In other words, you can create a symbolic link /usr/bin/pecl in ln-s or set PATH to include /opt/remi/php72/root/usr/bin/ to find the command.

If you listen to the Remi's RPM Repository forums, you may find out why.


2022-09-30 17:10

Personally, I think it would be good manners to manage software collections packages with alternates, but I think /usr/bin/pecl will be created by doing the following.

$sudo alternatives--install/usr/bin/pecl pecl/opt/remi/php72/root/usr/bin/pecl1


2022-09-30 17:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.