Unable to install PHP PECL via Cpanel (WHM) or SSH


When I try to install a module through PHP PECL through cpanel or whm (CENTOS 6.3 x86_64 / WHM 11.34.0 (build 7) ) I always get this result:

ERROR: `/root/tmp/pear/imagick/configure --with-imagick' failed The Imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626

Here in another example with html_parse:

ERROR: `/root/tmp/pear/html_parse/configure --with-ekhtml' failed The html_parse.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626

I have googled it, done the suggestions and always the same result.

What library are you trying to install?

I've found mixed results using pecl on Redhat, centos, or fedora machinces if I've ever used yum to install their versions of PHP libs. The easiest way around your issue would be to look to see if it's in the Yum repo and install it that way:

 yum search 'modulename'
 yum install 'packagename'

I usually just do a yum search php and scan down the list of modules.

If you want to use pecl or can't because the libraries aren't part of yum, I'd remove the natively included version and build your PHP from scratch. You can remove PHP and related libraries installed with the distro via yum as well.