php - 安装 PHPUnit 'unknown channel "时出错 pear.phpunit.de"in "pear.phpunit.de/PHPUnit"'

标签 php linux

pear.phpunit.de/PHPUnit 中安装 PHPUnit 未知 channel pear.phpunit.de 时出错 无效的包名称/包文件 "Debian-4 操作系统上的 pear.phpunit.de/PHPUnit”。

我已按照 http://phpunit.de/manual/3.7/en/installation.html 中的说明进行操作我已经尝试了 PHAR 方法和 PEAR 方法,但都没有用。

这是服务器设置:

PEAR Version: 1.9.4

PHP Version: 5.4.4-14+deb7u3

Zend Engine Version: 2.4.0

Running on: Linux lsh1001 3.9.6-hw+ #6 SMP

当我尝试使用 PEAR 方法安装时,我运行:

pear config-set auto_discover 1

我收到了

config-set succeeded

但是,当我运行

pear install pear.phpunit.de/PHPUnit

我收到:

Attempting to discover channel "pear.phpunit.de"...
downloading channel.xml ...
Starting to download channel.xml (804 bytes)
....done: 804 bytes
Auto-discovered channel "pear.phpunit.de", alias "pear.phpunit.de", adding to registry
unknown channel "pear.phpunit.de" in "pear.phpunit.de/PHPUnit"
invalid package name/package file "pear.phpunit.de/PHPUnit"
install failed

我刚开始使用命令行提示符,所以我可能会做一些奇怪的事情。我尝试在代码行前加上 sudo,但我收到:

-bash: sudo: command not found

当我这样做的时候。

我希望能够使用浏览器前端而不是命令行安装来运行 PHPUnit。我也尝试了 PHAR 安装方法,但我不确定如何指向已安装的 phpunit.phar 文件。我可以直接从命令行运行 phpunit.phar 文件,但如何在我的 php.ini 文件中引用它?我已将该文件留在我的根目录中并且没有移动它。

最佳答案

试试这个命令流程

pear channel-discover pear.phpunit.de

pear install phpunit/PHPUnit

并且...如果您是 root,请忽略 sudo

引用 PHPUnit Site

关于php - 安装 PHPUnit 'unknown channel "时出错 pear.phpunit.de"in "pear.phpunit.de/PHPUnit"',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18603825/

相关文章:

javascript - jQuery PHP MySQL 喜欢按钮

php - 如何在php/mysql中根据列高效打印数据库排序中的名称?

linux - 如何在没有 SSH 的情况下远程重启 Linux 服务器?

导致内核崩溃的 Java 8 gradle 脚本

python - 在子进程python + bash中获取进程的pid

linux - 将变量附加到另一个变量的每一行

php - 从随机 PHP 整数填充 SQL 中一列的所有行

php - 试图获取PHP中非对象错误的属性

php - 为什么 google chrome 将我的页面放在窗口的正中央(CSS 和 HTML 问题)?

linux - 如何在 Linux 中监视串行端口上的数据?