PHP の Web アプリケーションでキャッシュを利用してパフォーマンスの向上を検討しようとして PEAR の Cache_Lite を利用しようとしました。
ところが、Cache_Lite をインストールしようとしたらエラーが。。。
# pear install pear/Cache_Lite pear/Cache_Lite requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9 No valid packages found install failed
PEAR Installerが古いということで、次に下記コマンドを実行。
# pear upgrade PEAR 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
とアップグレードができないので、–force オプション付きでリトライ。
# pear upgrade --force PEAR warning: pear/PEAR dependency package "pear/Console_Getopt" downloaded version 1.3.1 is not the recommended version 1.2.3 warning: pear/Archive_Tar requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9 warning: pear/Console_Getopt requires PEAR Installer (version >= 1.8.0), installed version is 1.4.9 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.10.tgz ... Starting to download Archive_Tar-1.3.10.tgz (18,294 bytes) ...done: 18,294 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/Archive_Tar-1.3.10 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"
アップグレードが成功したので、もう一度 Cache_Lite のインストール。
# pear install pear/Cache_Lite downloading Cache_Lite-1.7.15.tgz ... Starting to download Cache_Lite-1.7.15.tgz (32,355 bytes) .........done: 32,355 bytes install ok: channel://pear.php.net/Cache_Lite-1.7.15
以上です。備忘録。
# pear -V PEAR Version: 1.9.4 PHP Version: 5.1.6 Zend Engine Version: 2.1.0 Running on: Linux localhost 2.6.18-274.18.1.el5 #1 SMP Thu Feb 9 17:45:52 EST 2012 i686