无法在 XAMPP 中安装 PHPUnit pear 包

发布于 2024-10-19 23:14:19 字数 1063 浏览 2 评论 0原文

这是我的问题。我已经在 XAMPP 社区论坛中问过这个问题 但没有回复。也许你们中的一些人可以提供帮助。

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

  • Win 7,32 位
  • xampp-win32-1.7.4-VC6

我想通过 pear 更新 PHPUnit,以便我可以将其用于 Selenium 测试

首先,添加 Channel

pear channel-discover pear.phpunit .de

然后我安装包

pear install 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

我什至尝试完全重新安装 xampp,但这没有帮助。

我也做了一件

pear install phpunit/PHPUnit

没有改变的事情。

这可能是由于火瀑布设置造成的吗?

我希望有人能帮助我解决这个问题。

最好的问候

杰里米

Here is my problem. I already asked that question in the XAMPP community forum
but no reply. Maybe some of you can help.

I am running XAMPP with the following config

  • Win 7, 32 bit
  • xampp-win32-1.7.4-VC6

I want to update PHPUnit via pear that I can use it for Selenium Testing

First, add I the Channel

pear channel-discover pear.phpunit.de

Then I install package

pear install phpunit/PHPUnit

Right here I get always the same error message ...

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

I even tried to reinstall xampp completely, which didn't helped.

I also did an

pear install phpunit/PHPUnit

Didn't changed a thing.

Can this be due to an firefall setting?

I hope somebody can help me with this problem.

Best regards

Jeremy

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

¢好甜 2024-10-26 23:14:19

Jeremy,

我的电脑环境有完全相同的设置...

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

  1. 您的系统上安装了哪个版本的 pear...输入“ pear info pear ”(不带引号)。

  2. 您至少需要 1.9.1 版本。如果没有输入“pear Upgrade pear”

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

  4. 也尝试“ pear Remote- list -c phpunit " 来发现 phpunit 中的软件包

  5. 或者 " pear install phpunit/the_package_name "

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

Jeremy,

I have the exact same set-up on my pc environment...

Win 7, 32 bit
xampp-win32-1.7.4-VC6

  1. what version pear is installed on you system...type " pear info pear " (without quotes).

  2. You need version 1.9.1 at least. If not type " pear upgrade pear "

  3. Tip - open cmd open as administrator - it makes a huge difference

  4. also try " pear remote-list -c phpunit " to discover packages you have in phpunit

  5. and either " pear install phpunit/the_package_name "

It worked for me - I hope this helps...There are other ways but I find this the most effective way with xampp 1.7.4 in windows 7

明月夜 2024-10-26 23:14:19

尝试:

pear install --force pear
pear channel-discover pear.phpunit.de
pear install --force --alldeps phpunit/PHPUnit

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

Pear 更新问题?

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

php go-pear.php

然后,如果这不起作用,

以管理员权限启动 shell(右键单击 -> 以管理员身份运行)。 回复评论:

如果 pear 告诉您它不知道像 pear.symfony-project.com 这样的频道,您需要运行:

pear channel-discover pear.symfony-project.com

Try:

pear install --force pear
pear channel-discover pear.phpunit.de
pear install --force --alldeps phpunit/PHPUnit

Post a comment if it doesn't work and I'll investigate further

Pear update Problems?

To update your PEAR installation, request http://pear.php.net/go-pear.phar in your browser and save the output to a local file go-pear.php. You can then run

php go-pear.php

If that doesn't work start the shell with admin privileges (rightclick -> run as admin).

Reponse to the comment:

If pear tells you that it doesn't know about a channel like pear.symfony-project.com you need to run:

pear channel-discover pear.symfony-project.com
扬花落满肩 2024-10-26 23:14:19

转到 C:\Users\nameuser\AppData\Local\Temp\pear\cache,其中 nameuser 是您的 Windows 用户名。

在此文件夹中,删除所有临时行,然后尝试使用上述步骤进行更新。

Go to C:\Users\nameuser\AppData\Local\Temp\pear\cache, where nameuser is your Windows username.

In this folder, delete all temporary lines and then try to update with the above steps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文