Cannot use pear or pecl with php@7.2 installation in command line


(PK) #1

When I type pecl or pear in command line it tells command not found.

I have installed php@7.2 with brew but for some reasons I cannot use pear and pecl. When I check

brew list php@7.2

It shows that pear and pecl are installed.

/usr/local/Cellar/php@7.2/7.2.13/.bottle/etc/ (4 files)
/usr/local/Cellar/php@7.2/7.2.13/.bottle/var/log/php-fpm.log
/usr/local/Cellar/php@7.2/7.2.13/bin/pear
/usr/local/Cellar/php@7.2/7.2.13/bin/peardev
/usr/local/Cellar/php@7.2/7.2.13/bin/pecl
/usr/local/Cellar/php@7.2/7.2.13/bin/phar
/usr/local/Cellar/php@7.2/7.2.13/bin/phar.phar
/usr/local/Cellar/php@7.2/7.2.13/bin/php
/usr/local/Cellar/php@7.2/7.2.13/bin/php-cgi
/usr/local/Cellar/php@7.2/7.2.13/bin/php-config
/usr/local/Cellar/php@7.2/7.2.13/bin/phpdbg
/usr/local/Cellar/php@7.2/7.2.13/bin/phpize
/usr/local/Cellar/php@7.2/7.2.13/homebrew.mxcl.php@7.2.plist
/usr/local/Cellar/php@7.2/7.2.13/include/php/ (310 files)
/usr/local/Cellar/php@7.2/7.2.13/lib/httpd/modules/libphp7.so
/usr/local/Cellar/php@7.2/7.2.13/lib/php/ (14 files)
/usr/local/Cellar/php@7.2/7.2.13/pecl -> /usr/local/lib/php/pecl
/usr/local/Cellar/php@7.2/7.2.13/sbin/php-fpm
/usr/local/Cellar/php@7.2/7.2.13/share/man/ (8 files)
/usr/local/Cellar/php@7.2/7.2.13/share/php/fpm/status.html
/usr/local/Cellar/php@7.2/7.2.13/share/php@7.2/ (158 files)

Can I please know why cannot I access pear and pecl from command line?


(Sean Molenaar) #2

without explanation of “cannot use pear” it’s difficult to know where the issue could be. So i’ll guess that “cannot use” means that it doesn’t recognize the command.

what does ls -al (which pecl) show?