I’m setting up my php setup, and I decided to install PEAR but even following the official installation I couldn’t install. I downloaded PEAR manually through https://pear.php.net/go-pear.phar followed the installation, added the path ‘/home/Thiago/pear/bin’ to the environment variable, I tried to access the binary through the path ‘/home/Thiago/pear/bin/pear’ but the directory is empty, I’m currently using arch Linux and these are the installation paths, could you help me.
- Installation base ($prefix) : /home/Thiago/pear
- Temporary directory for processing : /tmp/pear/install
- Temporary directory for downloads : /tmp/pear/install
- Binaries directory : /home/Thiago/pear/bin
- PHP code directory ($php_dir) : /home/Thiago/pear/share/pear
- Documentation directory : /home/Thiago/pear/docs
- Data directory : /home/Thiago/pear/data
- User-modifiable configuration files directory : /home/Thiago/pear/cfg
- Public Web Files directory : /home/Thiago/pear/www
- System manual pages directory : /home/Thiago/pear/man
- Tests directory : /home/Thiago/pear/tests
- Name of configuration file : /home/Thiago/.pearrc
echo $PATH
/home/Thiago/pear/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/Thiago/pear/bin:/home/Thiago/pear/bin/pear
uname -srm
Linux 6.9.8-arch1-1 x86_64
I’ve already tried to add the path in Zsh either by "path+=’/…/’ I also changed the ~/.zshrc and I also tried to look for the binary that was missing but I didn’t find it in the system using "whereis"
2
Answers
i have the exactly same problem, and also i tried to install it from AUR (
php-pear
package) and didn’t work either (neitherpear
norpecl
commands are found).This was fixed upstream in versions 8.2.22 and 8.3.10. To make it work on older versions (I’ve tested 7.3 and 7.4 series), apply the patch from the issue to PHP: