簡體   English   中英

在“pear.phpunit.de/PHPUnit”中安裝PHPUnit'未知頻道“pear.phpunit.de”時出錯

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

pear.phpunit.de/PHPUnit Debian-4操作系統上的pear.phpunit.de中安裝PHPUnit未知通道pear.phpunit.depear.phpunit.de/PHPUnit無效的包名/包文件“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站點

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM