pecl: command not found on macbook

Abhimanyue Singh Tanwar picture Abhimanyue Singh Tanwar · Feb 4, 2019 · Viewed 16.3k times · Source

my php version is 7.3.1 I can see the pecl is installed on my mac but . whenever I am trying to access it through the terminal, it says pecl:command not found. Please help me with the same.

Answer

prashant picture prashant · Feb 26, 2019

Following instructions install PEAR and PECL on Mac OS X under /usr/local/.

PECL is bundled with PEAR. So this is as simple as installing PEAR on Mac OS X.

Download PEAR

curl -O https://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar

Configure and Install PEAR

You should now be at a prompt to configure PEAR.

  1. Type 1 and press return.
  2. Enter: /usr/local/pear
  3. Type 4 and press return.
  4. Enter: /usr/local/bin
  5. Press return

Verify PEAR

You should be able to type:

pear version