How to install PHP, Pear, PECL, and APC with Homebrew on Mac OS X?

Posted by Andrew on Super User See other posts from Super User or by Andrew
Published on 2011-06-02T15:50:22Z Indexed on 2012/09/12 15:41 UTC
Read the original article Hit count: 367

Filed under:
|
|
|
|

I'm trying to install APC for PHP 5.3 in the easiest way possible. I love Homebrew so I started down that route. I was able to install PHP 5.3.6 with this command:

brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/php.rb --with-mysql

I think this is supposed to install PHP, Pear, and PECL. It seems to install these just fine.

Now when I try to install APC:

$ pecl install apc
downloading APC-3.1.9.tgz ...
Starting to download APC-3.1.9.tgz (155,540 bytes)
.................................done: 155,540 bytes

Warning: require_once(Archive/Tar.php): failed to open stream: No such file or directory in PackageFile.php on line 305

Warning: require_once(Archive/Tar.php): failed to open stream: No such file or directory in /usr/local/Cellar/php/5.3.6/lib/php/PEAR/PackageFile.php on line 305

Fatal error: require_once(): Failed opening required 'Archive/Tar.php' (include_path='/usr/local/Cellar/php/5.3.6/lib/php') in /usr/local/Cellar/php/5.3.6/lib/php/PEAR/PackageFile.php on line 305

How can I fix this?

© Super User or respective owner

Related posts about mac

Related posts about php