简体   繁体   English

在“pear.phpunit.de/PHPUnit”中安装PHPUnit'未知频道“pear.phpunit.de”时出错

[英]Error when installing PHPUnit 'unknown channel “pear.phpunit.de” in “pear.phpunit.de/PHPUnit”'

Error when installing PHPUnit unknown channel pear.phpunit.de in pear.phpunit.de/PHPUnit invalid package name/package file "pear.phpunit.de/PHPUnit" on Debian-4 OS. pear.phpunit.de/PHPUnit Debian-4操作系统上的pear.phpunit.de中安装PHPUnit未知通道pear.phpunit.depear.phpunit.de/PHPUnit无效的包名/包文件“pear.phpunit.de/PHPUnit”。

I've followed instructions as per the instructions contained at http://phpunit.de/manual/3.7/en/installation.html and I've tried the PHAR method and the PEAR method, but neither are working. 我按照http://phpunit.de/manual/3.7/en/installation.html中的说明按照说明操作,我尝试过PHAR方法和PEAR方法,但两种方法都没有。

Here's the server set up: 这是服务器设置:

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

WHen I try to install using the PEAR method, I run: 当我尝试使用PEAR方法安装时,我运行:

pear config-set auto_discover 1

and I receive 我收到了

config-set succeeded

However, when I run 但是,当我跑

pear install pear.phpunit.de/PHPUnit

and I receive: 我收到:

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

I'm new to using the command line prompt so I may be doing something strange. 我是新手使用命令行提示符,所以我可能会做一些奇怪的事情。 I've tried prefixing the lines of code with sudo , but I receive: 我试过用sudo为代码行添加前缀,但我收到:

-bash: sudo: command not found

when I do this. 当我这样做。

I want to be able to run PHPUnit using the browser front-end rather than the command line install. 我希望能够使用浏览器前端而不是命令行安装来运行PHPUnit I also tried the PHAR install method, but I'm not sure how to point to the installed phpunit.phar file. 我也尝试过PHAR安装方法,但我不确定如何指向已安装的phpunit.phar文件。 I can run the phpunit.phar file straight from the command line, but how would I refer to it in my php.ini file? 我可以直接从命令行运行phpunit.phar文件,但是我如何在我的php.ini文件中引用它? I have left the file in my root directory and haven't moved it. 我已将文件保留在我的根目录中并且没有移动它。

try this command flow 试试这个命令流程

pear channel-discover pear.phpunit.de

pear install phpunit/PHPUnit

and... if you are root ignore sudo 并且...如果你是root忽略sudo

Reffer PHPUnit Site 提供PHPUnit站点

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM