无法在XAMPP中安装PHPUnit pear包

Jer*_* S. 3 php xampp pear phpunit windows-7

这是我的问题.我已经在XAMPP社区论坛中提出了这个问题,但没有回复.也许有些人可以提供帮助.

我正在使用以下配置运行XAMPP

  • 赢7,32位
  • XAMPP-win32-1.7.4,VC6

我想通过pear更新PHPUnit,我可以将它用于Selenium Testing

首先,添加我的频道

梨通道 - 发现pear.phpunit.de

然后我安装包

pear安装phpunit/PHPUnit

就在这里,我总是得到相同的错误信息......

Warning: file_exists (): Unable to find the wrapper "channel" - did you forget to
enable it when you configured PHP? in PEAR \ Downloader \ Package.php on line 1416

Warning: is_file (): Unable to find the wrapper "channel" - did you forget to ena
ble it when you configured PHP? in PEAR \ Downloader \ Package.php on line 1425

Warning: is_file (): Unable to find the wrapper "channel" - did you forget to ena
ble it when you configured PHP? in PEAR \ Downloader \ Package.php on line 1425
Run Code Online (Sandbox Code Playgroud)

我甚至试图完全重新安装xampp,这没有帮助.

我也做了一个

pear install phpunit/PHPUnit
Run Code Online (Sandbox Code Playgroud)

没改变一件事.

这可能是由于火灾设置?

我希望有人可以帮我解决这个问题.

最好的祝福

杰里米

sla*_*nje 6

杰里米

我的电脑环境设置完全一样......

赢7,32位xampp-win32-1.7.4-VC6

  1. 在你的系统上安装了什么版本的梨...键入"梨信息梨"(没有引号).

  2. 您至少需要1.9.1版本.如果没有输入"梨升级梨"

  3. 提示 - 以管理员身份打开cmd - 这会产生巨大的差异

  4. 还可以尝试"pear remote-list -c phpunit"来发现你在phpunit中的软件包

  5. 并且"pear install phpunit/the_package_name"

它对我有用 - 我希望这有帮助...还有其他方法,但我发现这是Windows 7中xampp 1.7.4最有效的方法


edo*_*ian 5

尝试:

pear install --force pear
pear channel-discover pear.phpunit.de
pear install --force --alldeps phpunit/PHPUnit
Run Code Online (Sandbox Code Playgroud)

发表评论,如果它不起作用,我会进一步调查

梨更新问题?

要更新您的PEAR安装,请在浏览器中请求http://pear.php.net/go-pear.phar并将输出保存到本地文件go-pear.php.然后你就可以跑了

php go-pear.php
Run Code Online (Sandbox Code Playgroud)

如果这不起作用,请使用管理员权限启动shell(右键单击 - >以管理员身份运行).

回应评论:

如果梨告诉你它不知道pear.symfony-project.com你需要运行的频道:

pear channel-discover pear.symfony-project.com
Run Code Online (Sandbox Code Playgroud)