OSX 10.8 mountain lion PEAR / PHPUnit not working

greg picture greg · Jul 30, 2012 · Viewed 12k times · Source

I have installed Mountain Lion and I can't get phpunit to work.

$ pear config-get bin_dir
/Users/greg/pear/bin


$cd /Users/greg/pear/bin
$ls 
pear*
peardev*
pecl*
phpunit*

$phpunit
-bash: phpunit: command not found

Answer

yegor256 picture yegor256 · Aug 2, 2012

Read this blog post: http://vanderveer.be/blog/2012/10/12/setting-up-my-perfect-developer-environment-on-osx-10-dot-8-mountain-lion-10-dot-8-2-final-edition/

$ sudo cp /private/etc/php.ini.default /private/etc/php.ini
$ sudo php /usr/lib/php/install-pear-nozlib.phar
$ pear config-set php_ini /private/etc/php.ini
$ pecl config-set php_ini /private/etc/php.ini  
$ sudo pear upgrade-all

Works for me.