I'm trying to tell pear
that where to find PHPUnit by using this command:
我试图通过使用此命令告诉pear在哪里找到PHPUnit:
sudo pear channel-discover pear.phpunit.de
The output was:
输出是:
Discovering channel pear.phpunit.de over http:// failed with message: channel-add: Cannot open "http://pear.phpunit.de/channel.xml" (File http://pear.phpunit.de:80/channel.xml not valid (received: HTTP/1.1 410 Gone
))
Trying to discover channel pear.phpunit.de over https:// instead
Discovery of channel "pear.phpunit.de" failed (channel-add: Cannot open "https://pear.phpunit.de/channel.xml" (File https://pear.phpunit.de:443/channel.xml not valid (received: HTTP/1.1 410 Gone
)))
I tried the following commands:
我尝试了以下命令:
sudo pear channel-update pear.php.net
sudo pear upgrade-all
Then I ran channel-discover
command again. I got same error as shown above.
I even tried these commands:
然后我再次运行了channel-discover命令。我得到了如上所示的相同错误。我甚至试过这些命令:
sudo pear config-set auto_discover 1
Output:
config-set succeeded
Then I tried this command:
然后我尝试了这个命令:
sudo pear install pear.phpunit.de/PHPUnit
Output:
Attempting to discover channel "pear.phpunit.de"...
Attempting fallback to https instead of http on channel "pear.phpunit.de"...
unknown channel "pear.phpunit.de" in "pear.phpunit.de/PHPUnit"
invalid package name/package file "pear.phpunit.de/PHPUnit"
install failed
So I visited this link: https://pear.phpunit.de/channel.xml
and it displayed 410 gone
error. Is there any other alternate way to do this?
所以我访问了这个链接:https://pear.phpunit.de/channel.xml,它显示410错误。还有其他替代方法吗?
4 个解决方案
#1
17
You can't install phpunit using pear anymore: https://github.com/sebastianbergmann/phpunit/wiki/End-of-Life-for-PEAR-Installation-Method
你不能再使用pear安装phpunit了:https://github.com/sebastianbergmann/phpunit/wiki/End-of-Life-for-PEAR-Installation-Method
But you can still install it using the phar file: https://phpunit.de/getting-started.html
但您仍然可以使用phar文件安装它:https://phpunit.de/getting-started.html
Or using composer: https://phpunit.de/manual/current/en/installation.html#installation.composer
或者使用作曲家:https://phpunit.de/manual/current/en/installation.html#installation.composer
#2
3
Most people just composer nowadays. But since you seem to be on Ubuntu you can always do:
现在大多数人只是作曲家。但既然你似乎在Ubuntu,你可以随时做:
sudo apt-get install phpunit
#3
0
Download the phar archive worked for me:
下载为我工作的phar档案:
https://github.com/Mayflower/PHP_CodeBrowser
wget https://github.com/mayflower/PHP_CodeBrowser/releases/download/1.1.1/phpcb-1.1.1.phar
mv phpcb-1.1.1.phar /usr/local/bin/phpcb
chmod a+x /usr/local/bin/phpcb
phpcb --version
PHP_CodeBrowser version 1.1.1
#4
0
For those on RHEL distros (CentOS/Fedora/ etc) and not yet using composer, you can install phpunit using YUM:
对于RHEL发行版(CentOS / Fedora / etc)上尚未使用composer的用户,可以使用YUM安装phpunit:
yum install phpunit
#1
17
You can't install phpunit using pear anymore: https://github.com/sebastianbergmann/phpunit/wiki/End-of-Life-for-PEAR-Installation-Method
你不能再使用pear安装phpunit了:https://github.com/sebastianbergmann/phpunit/wiki/End-of-Life-for-PEAR-Installation-Method
But you can still install it using the phar file: https://phpunit.de/getting-started.html
但您仍然可以使用phar文件安装它:https://phpunit.de/getting-started.html
Or using composer: https://phpunit.de/manual/current/en/installation.html#installation.composer
或者使用作曲家:https://phpunit.de/manual/current/en/installation.html#installation.composer
#2
3
Most people just composer nowadays. But since you seem to be on Ubuntu you can always do:
现在大多数人只是作曲家。但既然你似乎在Ubuntu,你可以随时做:
sudo apt-get install phpunit
#3
0
Download the phar archive worked for me:
下载为我工作的phar档案:
https://github.com/Mayflower/PHP_CodeBrowser
wget https://github.com/mayflower/PHP_CodeBrowser/releases/download/1.1.1/phpcb-1.1.1.phar
mv phpcb-1.1.1.phar /usr/local/bin/phpcb
chmod a+x /usr/local/bin/phpcb
phpcb --version
PHP_CodeBrowser version 1.1.1
#4
0
For those on RHEL distros (CentOS/Fedora/ etc) and not yet using composer, you can install phpunit using YUM:
对于RHEL发行版(CentOS / Fedora / etc)上尚未使用composer的用户,可以使用YUM安装phpunit:
yum install phpunit