1

当我在命令下运行时它会出错。

梨安装 pear.phpunit.de/PHPUnit

WARNING: channel "pear.phpunit.de" has updated its protocols, use "pear channel-update
pear.phpunit.de" to update
downloading PHPUnit-3.6.12.tgz ...
Starting to download PHPUnit-3.6.12.tgz (119,220 bytes)
..........................done: 119,220 bytes
ERROR: failed to create /Applications/MAMP/bin/php5.3/share/pear/PHPUnit/Extensions 
/PhptTestCase/.tmpLogger.php: fopen(/Applications/MAMP/bin/php5.3/share/pear/PHPUnit 
/Extensions/PhptTestCase/.tmpLogger.php): failed to open stream: Permission denied

我正在使用 mac 和 mamp,我想安装 PHPUnit,请帮助。

---编辑---

我授予了一些权限,现在它显示以下错误无法删除/Applications/MAMP/bin/php5.3/bin/phpunit,无法重命名/Applications/MAMP/bin/php5.3/bin/.tmpphpunit

4

2 回答 2

0

好像权限有问题。

  1. rm -rf /Applications/MAMP/bin/php5.3/bin/phpunit
  2. chmod 0777 /Applications/MAMP/bin/php5.3/ -r

然后重新安装phpunit。

于 2012-08-13T13:30:40.357 回答
0

使用 root 运行安装sudo

sudo pear install pear.phpunit.de/PHPUnit
于 2012-08-13T15:25:32.243 回答