I need to install the php-pear package on the current php7 - CentOS7 set up. I have tried using the remi rpm repository but it creates a new php package. I need it on the existing one. Can anyone help?
Asked
Active
Viewed 9,384 times
1 Answers
0
# verify that you do not have any php-pear package installed
sudo yum list installed | grep "php*-pear"
# verify what php version your command line is using (which is _likely_
# to be the same than your web server)
php -v
# see what are the available php-pear package
sudo yum list available | grep "php*-pear"
#install the relevant php pear package
sudo yum install php71w-pear
Related post (not a duplicate, but might help some people) yum install php-pear* on centos

Cedric
- 5,135
- 11
- 42
- 61
-
can't work in all case, package name is dependent on PHP provider, reason for my comment/question – Remi Collet Mar 28 '18 at 07:34
-
answer updated - there were mistakes in the grep pattern - now it will display all pear package available, with php 5+ (if any) and php 7 too. – Cedric Mar 28 '18 at 07:45
-
yum manages the dependencies for you and should install a already compiled package, not create a new one. If you follow the above steps, you will make sure to install the correct php pear for the version of PHP installed. The PHP provider in this case should be the yum package manager. – Cedric Mar 28 '18 at 07:46