PHP4.4.2にバンドルされているPEARが一部壊れている件
既存のPHPに対して上書きインストールの場合は問題になりませんが、新規インストールの場合は結構問題です。リリースされて2ヶ月経ちますが、まだ放置プレーですね。4.4.3では直ってそうですが。
make installすると、
# make install : Installing PEAR environment: /usr/local/lib/php44/pear/ [PEAR] Archive_Tar: bad md5sum for file /usr/local/lib/php44/pear/Archive/Tar.php [PEAR] Console_Getopt: bad md5sum for file /usr/local/lib/php44/pear/Console/Getopt.php [PEAR] HTML_Template_IT: bad md5sum for file /usr/local/lib/php44/pear/HTML/Template/IT.php : #
となり、肝心のConsole_Getoptがインストールされません。この状態でpearコマンドを打っても、
# /usr/local/lib/php44/bin/pear list Warning: main(Console/Getopt.php): failed to open stream: No such file or directory in System.php on line 27 Fatal error: main(): Failed opening required 'Console/Getopt.php' (include_path= '/usr/local/lib/php44/pear') in /usr/local/lib/php44/pear/System.php on line 27 #
となってしまいます。
手っ取り早い解決方法は、make install後にgo-pearですかね。以下はlynxインストールしてないのでwgetでやってます。。。
# wget --proxy=off -O - -q http://go-pear.org/ | /usr/local/lib/php44/bin/php Welcome to go-pear! Go-pear will install the 'pear' command and all the files needed by it. This command is your tool for PEAR installation and maintenance. Go-pear also lets you download and install the PEAR packages bundled with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit. :
実行途中に
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update
と表示されますので、
# /usr/local/lib/php4/bin/pear channel-update pear.php.net
とでもしておきましょう。