Symptoms
When trying to install a PHP PECL module you may see an error of the following in WHM
Path Path not found.
or when trying to install using the command line you see
ERROR: The default config file is not a valid config file or is corrupted.
Description
This typically occurs because the users PECL config file is incorrect or empty.
Workaround
If /root/.pearrc is empty then remove or move the file so it gets recreated when pecl is executed again:
[root@host ~]# cat /root/.pearrc
[root@host ~]# mv -v /root/pearrc{,.$(date +%s)}
renamed '/root/.pearrc' -> '/root/.pearrc.1712479586'
If the issue persists then check to make sure pecl exists for that PHP version. The below command will report all pecl binaries for the installed ea-php versions.
[root@host ~]# ls -lah /opt/*/*/root/usr/bin/pecl
-rwxr-xr-x 1 root root 299 Mar 19 23:42 /opt/cpanel/ea-php81/root/usr/bin/pecl
-rwxr-xr-x 1 root root 299 Mar 20 02:52 /opt/cpanel/ea-php82/root/usr/bin/pecl
If the pecl binary is not present for the PHP version the module is being installed for, then you will need to reinstall the pear package for that version. For example, reinstalling the ea-php80 version would use the below command.
yum reinstall ea-php80-pear -y
Other possibilities to review are:
Unable to Install a Module Using PECL
Comments
0 comments
Article is closed for comments.