2011-05-12 93 views
0
C:\Program Files\PHP>pear install phpunit/PHPUnit 
Did not download optional dependencies: ezc/ConsoleTools, use --alldeps to download automatically 

downloading PHPUnit-3.5.13.tgz ... 
Starting to download PHPUnit-3.5.13.tgz (118,553 bytes) 
..........................done: 118,553 bytes 
could not extract the package.xml file from "C:\Program Files\PHP\tmp\PHPUnit-3.5.13.tgz" Unable to create directory 'C:/Program/tmp42BA.tmp' 
Unable to create path for C:/Program/tmp42BA.tmp/package.xml 
Download of "phpunit/PHPUnit" succeeded, but it is not a valid package archive 
Error: cannot download "phpunit/PHPUnit" 

安装程序尝试写入c:\ Program目录而不是C:\ Program Files文件。phpUnit:安装:windows7:路径问题

如何解决?可能有人安装了phpunit.bat。

谢谢

+1

很可能它不喜欢“程序文件”中的空间。您必须告诉它使用不同的临时目录,或者通过Windows为支持向后兼容性而缩短的8.3版本来指定它。 – 2011-05-12 14:56:10

+0

@Marc B:好主意!谢谢!!!写答案)))我会在你的答案上设置'V'。 – 2011-05-12 15:02:29

+0

@Marc据我所知,这是正确的。谨慎发布它作为答案? :) ---有点相关:http://stackoverflow.com/questions/5801111/installing-pear-and-phpunit-with-xampp/5801138#5801138 – edorian 2011-05-12 15:04:17

回答

1

很可能它不喜欢“程序文件”中的空间。您必须告诉它使用不同的临时目录,或者通过Windows为支持向后兼容性而缩短的8.3版本来指定它。