PHPUnitインストールログ

失敗。

PEARのチャンネルを追加。

$ pear channel-discover pear.phpunit.de
Adding Channel "pear.phpunit.de" succeeded
Discovery of channel "pear.phpunit.de" succeeded
$ pear channel-discover pear.symfony-project.com
Adding Channel "pear.symfony-project.com" succeeded
Discovery of channel "pear.symfony-project.com" succeeded

symfony/YAMLをインストール【NG】

よくWeb上に転がっているコマンド。

$ pear install symfony/YAML 
downloading YAML-1.0.6.tgz ...
Starting to download YAML-1.0.6.tgz (10,010 bytes)
.....done: 10,010 bytes
install ok: channel://pear.symfony-project.com/YAML-1.0.6

symfony/YAMLをインストール【OK】

上のコマンドだとYamlのバージョン(Yaml-2.1.0以上)が古くてPHPUnitのインストールが失敗するので、以下のコマンドを使用する。

$ pear install pear.symfony.com/Yaml
downloading Yaml-2.1.2.tgz ...
Starting to download Yaml-2.1.2.tgz (38,429 bytes)
..........done: 38,429 bytes
install ok: channel://pear.symfony.com/Yaml-2.1.2

PHPUnitをインストール(成功)

$ pear install phpunit/PHPUnit
Did not download optional dependencies: phpunit/PHP_Invoker, use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1.1.0)
downloading PHPUnit-3.7.8.tgz ...
Starting to download PHPUnit-3.7.8.tgz (115,978 bytes)
.........................done: 115,978 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.7.8

PHP_Invokerがどうとか言っているのでついでにインストールする。

$ pear install phpunit/PHP_Invoker
downloading PHP_Invoker-1.1.2.tgz ...
Starting to download PHP_Invoker-1.1.2.tgz (3,705 bytes)
....done: 3,705 bytes
install ok: channel://pear.phpunit.de/PHP_Invoker-1.1.2

YAMLのバージョンが古くて失敗したときのPHPUnitインストールログ。

$ pear install phpunit/PHPUnit
Unknown remote channel: pear.symfony.com
Did not download optional dependencies: phpunit/PHP_Invoker, use --alldeps to download automatically
phpunit/PHPUnit requires package "channel://pear.symfony.com/Yaml" (version >= 2.1.0)
phpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1.1.0)
phpunit/PHP_CodeCoverage can optionally use PHP extension "xdebug" (version >= 2.0.5)
phpunit/PHPUnit_MockObject can optionally use PHP extension "soap"
downloading File_Iterator-1.3.3.tgz ...
Starting to download File_Iterator-1.3.3.tgz (5,152 bytes)
.....done: 5,152 bytes
downloading Text_Template-1.1.3.tgz ...
Starting to download Text_Template-1.1.3.tgz (3,594 bytes)
...done: 3,594 bytes
downloading PHP_CodeCoverage-1.2.6.tgz ...
Starting to download PHP_CodeCoverage-1.2.6.tgz (155,960 bytes)
...done: 155,960 bytes
downloading PHP_Timer-1.0.4.tgz ...
Starting to download PHP_Timer-1.0.4.tgz (3,694 bytes)
...done: 3,694 bytes
downloading PHPUnit_MockObject-1.2.1.tgz ...
Starting to download PHPUnit_MockObject-1.2.1.tgz (20,417 bytes)
...done: 20,417 bytes
downloading PHP_TokenStream-1.1.5.tgz ...
Starting to download PHP_TokenStream-1.1.5.tgz (9,859 bytes)
...done: 9,859 bytes
install ok: channel://pear.phpunit.de/File_Iterator-1.3.3
install ok: channel://pear.phpunit.de/Text_Template-1.1.3
install ok: channel://pear.phpunit.de/PHP_Timer-1.0.4
install ok: channel://pear.phpunit.de/PHP_TokenStream-1.1.5
install ok: channel://pear.phpunit.de/PHP_CodeCoverage-1.2.6
install ok: channel://pear.phpunit.de/PHPUnit_MockObject-1.2.1