无法在首选状态“稳定”下下载 pear/HTTP_Request2
当尝试这样做时
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如在线 PEAR 手册中提到的,PEAR 安装程序默认只安装稳定版包。如果您希望安装尚未声明稳定的软件包,则可以在不更改首选状态的情况下安装它,方法是在尝试安装它时指定版本号或其状态。因此:
或者,如果某个软件包处于 beta 版本,您可以使用以下命令安装它:
类似地,如果该软件包处于 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:
Or, if a package is in beta you can install it with:
Similarly, if the package is in 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 ;)