PHPUnit安装错误

发布于 2024-11-18 20:44:47 字数 222 浏览 3 评论 0原文

运行我的 Pear phpunit/PHPUnit 安装时 - 这是我收到的错误

开始下载 YAML-1.0.6.tgz(10,010 字节) .....完成:10,010 字节 不支持 package.xml 版本“2.1”,仅支持 1.0 和 2.0。

“symfony/YAML”下载成功,但它不是有效的包存档

有人见过这个吗?

When running my Pear phpunit/PHPUnit install - this is the error I get

Starting to download YAML-1.0.6.tgz (10,010 bytes)
.....done: 10,010 bytes
package.xml version "2.1" is not supported, only 1.0 and 2.0 are supported.

Download of "symfony/YAML" succeeded, but it is not a valid package archive

Has anyone seen this before?

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

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

发布评论

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

评论(3

稍尽春風 2024-11-25 20:44:47

您很可能使用的是旧版本的 Pear。

尝试运行以下命令

pear upgrade PEAR

You most likely have an old version of Pear.

Try running the following

pear upgrade PEAR
感情旳空白 2024-11-25 20:44:47

我遇到了同样的问题,最终重新安装了 symfony/YAML 并且它起作用了,我的错误是:

 phpunit/PHPUnit requires package "symfony/YAML" (version >= 1.0.2, version <= 1.0.2), installed version is 1.0.6

所以我卸载了:

sudo pear uninstall symfony/YAML

从中我重新安装了它想要的版本

sudo pear install symfony/YAML-1.0.2

并重新运行安装:

sudo pear install phpunit/PHPUnit
"install ok: channel://pear.phpunit.de/PHPUnit-3.6.12"

I was getting the same issue and ended up reinstalling symfony/YAML and it worked, my error was:

 phpunit/PHPUnit requires package "symfony/YAML" (version >= 1.0.2, version <= 1.0.2), installed version is 1.0.6

So I uninstalled:

sudo pear uninstall symfony/YAML

From that I reinstalled the version it wanted

sudo pear install symfony/YAML-1.0.2

And re-ran the install:

sudo pear install phpunit/PHPUnit
"install ok: channel://pear.phpunit.de/PHPUnit-3.6.12"
鲜肉鲜肉永远不皱 2024-11-25 20:44:47

在遵循 http://www.phpunit.de/manual 后,CentOS 5.8 上出现同样的问题/3.6/en/installation.html,我解决了它

pear升级--force PEAR

梨列表

这导致

Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.10  stable
Console_Getopt   1.3.1   stable
PEAR             1.9.4   stable
Structures_Graph 1.0.4   stable
XML_RPC          1.5.5   stable
XML_Util         1.2.1   stable

我能够成功运行

pear 安装 pear.phpunit.de/PHPUnit

导致

install ok: channel://pear.phpunit.de/File_Iterator-1.3.1
install ok: channel://pear.phpunit.de/Text_Template-1.1.1
install ok: channel://pear.phpunit.de/PHP_Timer-1.0.2
install ok: channel://pear.symfony-project.com/YAML-1.0.6
install ok: channel://pear.phpunit.de/PHP_TokenStream-1.1.3
install ok: channel://pear.phpunit.de/PHP_CodeCoverage-1.1.3
install ok: channel://pear.phpunit.de/PHPUnit_MockObject-1.1.1
install ok: channel://pear.phpunit.de/PHPUnit-3.6.12

Same issue on CentOS 5.8 after following http://www.phpunit.de/manual/3.6/en/installation.html, I resolved it with

pear upgrade --force PEAR

pear list

which resulted in

Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.10  stable
Console_Getopt   1.3.1   stable
PEAR             1.9.4   stable
Structures_Graph 1.0.4   stable
XML_RPC          1.5.5   stable
XML_Util         1.2.1   stable

allowing me to successfully run

pear install pear.phpunit.de/PHPUnit

resulting in

install ok: channel://pear.phpunit.de/File_Iterator-1.3.1
install ok: channel://pear.phpunit.de/Text_Template-1.1.1
install ok: channel://pear.phpunit.de/PHP_Timer-1.0.2
install ok: channel://pear.symfony-project.com/YAML-1.0.6
install ok: channel://pear.phpunit.de/PHP_TokenStream-1.1.3
install ok: channel://pear.phpunit.de/PHP_CodeCoverage-1.1.3
install ok: channel://pear.phpunit.de/PHPUnit_MockObject-1.1.1
install ok: channel://pear.phpunit.de/PHPUnit-3.6.12
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文