1

I try it to install pear following this instructions

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

Then I set the Path and I type in terminal pear I get this message

 /usr/local/Cellar/php55/5.5.30/bin/pear: line 28: /usr/local/Cellar/php55/5.5.23/bin/php: No such file or directory
/usr/local/Cellar/php55/5.5.30/bin/pear: line 28: exec: /usr/local/Cellar/php55/5.5.23/bin/php: cannot execute: No such file or directory

Php was installed I few month ago with homebrew, I try several times and always I get the same error, there is not way to installed.

Palle
  • 11,511
  • 2
  • 40
  • 61
davidrg11
  • 191
  • 1
  • 1
  • 5

3 Answers3

0

To make it consistent, you should install PHP and pear using the same method (via Homebrew), e.g.:

brew tap homebrew/science
brew install php56 pear
kenorb
  • 155,785
  • 88
  • 678
  • 743
0

The correct answer (thanks to https://stackoverflow.com/a/36547172/1953740) is to install brew with --with-pear:

brew reinstall php56 --with-pear

The homebrew/science/pear package mentioned in the other comment is not the PHP package manager; it's something different.

Community
  • 1
  • 1
Ryan Biwer
  • 324
  • 4
  • 14
0

fixing it by creating symlink,

For example, I have my php executable file in MacPorts so for me it will be like this:

sudo ln -s /opt/local/bin/php56 /usr/local/Cellar/php55/5.5.23/bin/php

PS tested on macOS Hight Sierra 10.13.3, but it will work for El Capitan too

Yevgeniy Afanasyev
  • 37,872
  • 26
  • 173
  • 191