PHPUnit安装问题

时间:2012-08-13 13:06:36

标签: macos phpunit mamp

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

pear install 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,PLZ帮助。

--- ---编辑

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

2 个答案:

答案 0 :(得分:0)

似乎权限存在问题。

  1. rm -rf /Applications/MAMP/bin/php5.3/bin/phpunit
  2. chmod 0777 /Applications/MAMP/bin/php5.3/ -r
  3. 然后重新安装phpunit。

答案 1 :(得分:0)

使用sudo以root身份运行安装。

sudo pear install pear.phpunit.de/PHPUnit