18

我已经安装了 Mountain Lion,但我无法让 phpunit 工作。

$ 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
4

1 回答 1

44

阅读这篇博文:http: //vanderveer.be/blog/2012/10/12/setting-up-my-perfect-developer-environment-on-osx-10-dot-8-mountain-lion-10-dot -8-2-最终版/

$ 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

为我工作。

于 2012-08-02T07:30:14.923 回答