PHPUnit Installation Error
When running my Pear phpunit/PHPUnit install - this is the error I get
Starting to download YAML-1.0.6.tgz (1开发者_如何学运维0,010 bytes) .....done: 10,010 bytes package.xml version "2.1" is not supported, only 1.0 and 2.0 are supported.
Download of "symfony/YAML" succeeded, but it is not a valid package archive
Has anyone seen this before?
You most likely have an old version of Pear.
Try running the following
pear upgrade PEAR
I was getting the same issue and ended up reinstalling symfony/YAML and it worked, my error was:
phpunit/PHPUnit requires package "symfony/YAML" (version >= 1.0.2, version <= 1.0.2), installed version is 1.0.6
So I uninstalled:
sudo pear uninstall symfony/YAML
From that I reinstalled the version it wanted
sudo pear install symfony/YAML-1.0.2
And re-ran the install:
sudo pear install phpunit/PHPUnit
"install ok: channel://pear.phpunit.de/PHPUnit-3.6.12"
Same issue on CentOS 5.8 after following http://www.phpunit.de/manual/3.6/en/installation.html, I resolved it with
pear upgrade --force PEAR
pear list
which resulted in
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.10 stable
Console_Getopt 1.3.1 stable
PEAR 1.9.4 stable
Structures_Graph 1.0.4 stable
XML_RPC 1.5.5 stable
XML_Util 1.2.1 stable
allowing me to successfully run
pear install pear.phpunit.de/PHPUnit
resulting in
install ok: channel://pear.phpunit.de/File_Iterator-1.3.1
install ok: channel://pear.phpunit.de/Text_Template-1.1.1
install ok: channel://pear.phpunit.de/PHP_Timer-1.0.2
install ok: channel://pear.symfony-project.com/YAML-1.0.6
install ok: channel://pear.phpunit.de/PHP_TokenStream-1.1.3
install ok: channel://pear.phpunit.de/PHP_CodeCoverage-1.1.3
install ok: channel://pear.phpunit.de/PHPUnit_MockObject-1.1.1
install ok: channel://pear.phpunit.de/PHPUnit-3.6.12
精彩评论