Question

PECL command not found

Posted June 20, 2013 48.2k views
I'm trying to configure the Memcache module for W3 Total Cache on my wordpress install. I am running CentOS 6 on a LEMP stack. Everytime I try to run a PECL command it returns "-bash: pecl: command not found" I am at my wits end here and burnt out after several hours of googling. Help?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
7 answers
People said that installing php-devel would fix this but it still doesnt work
Heres the output when I tried running yum install php-devel

============================================================================================
[root@Manuals ~]# yum install php-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.ate.info
* extras: centos.crazyfrogs.org
* updates: mirror.ate.info
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-devel.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php(x86-64) = 5.3.3-22.el6 for package: php-devel-5.3 .3-22.el6.x86_64
--> Processing Dependency: automake for package: php-devel-5.3.3-22.el6.x86_64
--> Processing Dependency: autoconf for package: php-devel-5.3.3-22.el6.x86_64
--> Running transaction check
---> Package autoconf.noarch 0:2.63-5.1.el6 will be installed
---> Package automake.noarch 0:1.11.1-4.el6 will be installed
---> Package php.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-22.el6 for package: php-5. 3.3-22.el6.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.3.3-22.el6 for package: php-5.3.3 -22.el6.x86_64
--> Running transaction check
---> Package php.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-22.el6 for package: php-5. 3.3-22.el6.x86_64
---> Package php-cli.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-22.el6 for package: php-cl i-5.3.3-22.el6.x86_64
--> Finished Dependency Resolution
Error: Package: php-cli-5.3.3-22.el6.x86_64 (base)
Requires: php-common(x86-64) = 5.3.3-22.el6
Installed: php-common-5.4.16-1.el6.remi.x86_64 (@remi)
php-common(x86-64) = 5.4.16-1.el6.remi
Available: php-common-5.3.3-22.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-22.el6
Error: Package: php-5.3.3-22.el6.x86_64 (base)
Requires: php-common(x86-64) = 5.3.3-22.el6
Installed: php-common-5.4.16-1.el6.remi.x86_64 (@remi)
php-common(x86-64) = 5.4.16-1.el6.remi
Available: php-common-5.3.3-22.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-22.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
PECL is available from the php-pear package.
Try running yum install php-pear
Still doesn't work. This is the output I am getting from running yum install php-pear

=====================================================
[root@Manuals ~]# yum install php-pear
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.ate.info
* extras: centos.crazyfrogs.org
* updates: centos.copahost.com
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
Not using downloaded repomd.xml because it is older than what we have:
Current : Thu Jun 20 16:28:11 2013
Downloaded: Thu Jun 13 11:08:15 2013
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pear.noarch 1:1.9.4-4.el6 will be installed
--> Processing Dependency: php-cli >= 5.1.0-1 for package: 1:php-pear-1.9.4-4.el6.noarch
--> Running transaction check
---> Package php-cli.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-22.el6 for package: php-cli-5.3.3-22.el6.x86_64
--> Finished Dependency Resolution
Error: Package: php-cli-5.3.3-22.el6.x86_64 (base)
Requires: php-common(x86-64) = 5.3.3-22.el6
Installed: php-common-5.4.16-1.el6.remi.x86_64 (@remi)
php-common(x86-64) = 5.4.16-1.el6.remi
Available: php-common-5.3.3-22.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-22.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Try the following command:

yum install --enablerepo remi php-pear php-devel
More like:
yum remove php*
yum --enablerepo=remi install php php-pear

Unless it doesn't work after tryign this, then try
yum --enablerepo=remi install php-devel

You don't want to install a bunch of stuff that you won't even use.
Heh, that seemed to work Kamal. Its been a bit of a struggle getting Wordpress to play nicely with Nginx but I'm making progress.

Thank you both very much :-) DigitalOcean rocks
@JustGiveMeTheDamnManual: Really glad it worked! :] Basically, you were trying to install php-pear from the system's default repos which is outdated (5.3) so it's incompatible with php-common (5.4) that you have installed from the remi repo. Make sure you include --enablerepo remi when you're installing php-related packages :]
Submit an Answer