无法在首选状态“稳定”下下载 pear/HTTP_Request2

发布于 2024-11-25 11:54:03 字数 755 浏览 1 评论 0原文

当尝试这样做时

pear install phpunit/PHPUnit

,我收到以下错误

    Failed to download pear/HTTP_Request2 within preferred state "stable", latest release is version 2.0.0RC1, stability "beta", use "channel://pear.php.net/HTTP_Request2-2.0.0RC1" to install
phpunit/PHPUnit can optionally use PHP extension "curl"
phpunit/PHPUnit can optionally use PHP extension "dbus"
pear/XML_RPC2 requires package "pear/HTTP_Request2" (version >= 0.6.0)
phpunit/PHPUnit requires package "pear/XML_RPC2"
No valid packages found
install failed

它说就在那里使用另一个通道,但我似乎无法发现或添加该通道!执行此操作的正确命令是什么,或者我还能做什么?

非常感谢, MrB

编辑:

明白了,哇,发布后 10 秒。

pear install HTTP_Request2-2.0.0RC1

When trying to do

pear install phpunit/PHPUnit

I get the following error

    Failed to download pear/HTTP_Request2 within preferred state "stable", latest release is version 2.0.0RC1, stability "beta", use "channel://pear.php.net/HTTP_Request2-2.0.0RC1" to install
phpunit/PHPUnit can optionally use PHP extension "curl"
phpunit/PHPUnit can optionally use PHP extension "dbus"
pear/XML_RPC2 requires package "pear/HTTP_Request2" (version >= 0.6.0)
phpunit/PHPUnit requires package "pear/XML_RPC2"
No valid packages found
install failed

It says right there to use another channel, but I can't seem to discover or add that channel! What's the correct command to do this, or what else could I do?

Thank you very much,
MrB

edit:

Got it, wow, 10s after posting.

pear install HTTP_Request2-2.0.0RC1

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

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

发布评论

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

评论(1

滥情稳全场 2024-12-02 11:54:03

正如在线 PEAR 手册中提到的,PEAR 安装程序默认只安装稳定版包。如果您希望安装尚未声明稳定的软件包,则可以在不更改首选状态的情况下安装它,方法是在尝试安装它时指定版本号或其状态。因此:

$ pear install -f package_name-1.2.3

或者,如果某个软件包处于 beta 版本,您可以使用以下命令安装它:

$ pear install -f package_name-beta

类似地,如果该软件包处于 alpha 版本:

$ pear install -f package_name-alpha

也有一个“devel”稳定状态,但在该状态下发布的软件包并不多。
有时错误消息会包含有用的提示,如上面的问题所示;)

As mentioned in the online PEAR manual, the PEAR installer by default only installs stable packages. If you wish to install a package that hasn't yet been declared stable, you can do so, without changing the preferred state, by also specifying the version number or its state when attempting to install it. Thus:

$ pear install -f package_name-1.2.3

Or, if a package is in beta you can install it with:

$ pear install -f package_name-beta

Similarly, if the package is in alpha:

$ pear install -f package_name-alpha

There is a 'devel' stability state too, but not that many packages are released in that state.
Sometimes the error message will include a useful hint, as seen in your question above ;)

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