先日 PHP を 5.2 にバージョンアップを実行して使用していたのですが、pearのパッケージもカレンダーパッケージをインストールをしようとしたところ正常に実行することが出来ませんでした。
# pear install Calendar-beta
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
Did not download optional dependencies: pear/Date, use --alldeps to download automatically
pear/Calendar requires PEAR Installer (version >= 1.5.0), installed version is 1.4.9
pear/Calendar can optionally use package "pear/Date"
No valid packages found
install failed
どうやら、PEARのバージョン自体が低いようです。
1.5.0以降でないとインストール出来ないとのことなので早速アップグレードを実行。
# pear upgrade PEAR
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
pear/PEAR dependency package "pear/Console_Getopt" downloaded version 1.3.1 is not the recommended version 1.2.3, but may be compatible, use --force to install
pear/Archive_Tar requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9
pear/Console_Getopt requires PEAR Installer (version >= 1.8.0), installed version is 1.4.9
No valid packages found
upgrade failed
ぬう・・・これもバージョンアップが出来ないようです。
しかも、今度は1.5.4以降、さらには1.8.0以降でないと 駄目とか言ってきます。
とりあえず、1.5.4にアップデートをさせようと PEAR のバージョンを 1.5.4 を指定して直接アップデートをかけてみます。
# pear upgrade PEAR-1.5.4
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
Did not download optional dependencies: pear/XML_RPC, use --alldeps to download automatically
pear/PEAR dependency package "pear/Console_Getopt" downloaded version 1.3.1 is not the recommended version 1.2.2, but may be compatible, use --force to install
pear/Console_Getopt requires PEAR Installer (version >= 1.8.0), installed version is 1.4.9
downloading Archive_Tar-1.3.2.tgz ...
Starting to download Archive_Tar-1.3.2.tgz (17,150 bytes)
......done: 17,150 bytes
upgrade ok: channel://pear.php.net/Archive_Tar-1.3.2
おっと、どうやら動きがあったようです。
しかし、それでも 1.8.0 の PEAR を要求してきます。
それではと、1.8.0を指定。
# pear upgrade PEAR-1.8.0
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
pear/PEAR dependency package "pear/Archive_Tar" installed version 1.3.8 is not the recommended version 1.3.3, but may be compatible, use --force to install
pear/PEAR dependency package "pear/Console_Getopt" downloaded version 1.3.1 is not the recommended version 1.2.3, but may be compatible, use --force to install
pear/Archive_Tar requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9
pear/Console_Getopt requires PEAR Installer (version >= 1.8.0), installed version is 1.4.9
No valid packages found
upgrade failed
ありゃ、 1.5.4 を再度要求されました。
やはり 1.5.4 自体が正常にインストールが出来ていないようです。
これではインストール出来ないループになってしまっていますのでここから打開策を見つけないといけません。
再度 1.5.4 のインストールを敢行すると表記が変わっていました。
# pear upgrade PEAR-1.5.4
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
pear/PEAR dependency package "pear/Console_Getopt" downloaded version 1.3.1 is not the recommended version 1.2.2, but may be compatible, use --force to install
pear/Console_Getopt requires PEAR Installer (version >= 1.8.0), installed version is 1.4.9
No valid packages found
upgrade failed
use –force to install つまり、強制インストールをしろと言うことらしいです。
その前にチャンネルを更新しろというワーニングが出ているのでそれを改善してみようと実行するも・・・
# pear update-channels
HTTP error, got response: HTTP/1.1 410 Gone
Didn't receive 200 OK from remote server. (HTTP/1.1 410 Gone)
すがすがしいぐらいに即答されました![]()
強制インストールしてもあまり正常に動作した経験が少ないので気が進まないのですが、このままだと手詰まりなので渋々実行。
# pear upgrade --force PEAR-1.5.4
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
Did not download optional dependencies: pear/XML_RPC, use --alldeps to download automatically
warning: pear/PEAR dependency package "pear/Console_Getopt" downloaded version 1.3.1 is not the recommended version 1.2.2
warning: pear/Console_Getopt requires PEAR Installer (version >= 1.8.0), installed version is 1.4.9
downloading PEAR-1.5.4.tgz ...
Starting to download PEAR-1.5.4.tgz (293,070 bytes)
.............................................................done: 293,070 bytes
downloading Console_Getopt-1.3.1.tgz ...
Starting to download Console_Getopt-1.3.1.tgz (4,471 bytes)
...done: 4,471 bytes
upgrade ok: channel://pear.php.net/Console_Getopt-1.3.1
upgrade ok: channel://pear.php.net/PEAR-1.5.4
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
To install use "pear install pear/PEAR#featurename"
どうやら無事、 1.5.4 へのアップグレードは出来ました。
では、続いて最新版へのバージョンアップを実行してみます。
# pear upgrade PEAR
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
downloading PEAR-1.9.4.tgz ...
Starting to download PEAR-1.9.4.tgz (296,332 bytes)
.............................................................done: 296,332 bytes
downloading Archive_Tar-1.3.8.tgz ...
Starting to download Archive_Tar-1.3.8.tgz (17,995 bytes)
...done: 17,995 bytes
upgrade ok: channel://pear.php.net/Archive_Tar-1.3.8
upgrade ok: channel://pear.php.net/PEAR-1.9.4
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
To install use "pear install pear/PEAR#featurename"
こちらも無事通りました。
強制実行もたまには良い結果をもたらすようです。
先ほど実行できなかったチャンネルのアップデートです。
# pear update-channels
Updating channel "doc.php.net"
Update of Channel "doc.php.net" succeeded
Updating channel "pear.php.net"
Update of Channel "pear.php.net" succeeded
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date
今度はきっちりアップデートを実行してくれました。
PEARのバージョンが低かったのがすべての元凶みたいですね。
最後に目的だったカレンダーモジュールを入れます。
# pear install Calendar-beta
WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update
downloading Calendar-0.5.5.tgz ...
Starting to download Calendar-0.5.5.tgz (58,159 bytes)
..............done: 58,159 bytes
install ok: channel://pear.php.net/Calendar-0.5.5
はい、こちらもすんなりとインストールすることが出来ました。
たまにpearのメンテナンスもしてあげないとアップデートが非常に面倒になったりするようです。
バージョンアップは定期的に![]()
関連のありそうなエントリ



