CentOS 5.9にてyumでperlアップデート後List::Utilがエラーになる件

P1010145

さっきAMA-TOOLBOXを使おうと思ったらInernal Server Errorになっていた。慌てて対応した。

AMA-TOOLBOX – トップページ

環境は、

$ uname -a
Linux rad-xen-vweb7 2.6.18-308.16.1.el5xen #1 SMP Tue Oct 2 23:41:32 EDT 2012 i686 i686 i386 GNU/Linux
$

 

# cat /etc/redhat-release
CentOS release 5.9 (Final)
#

/var/log/messagesを見るとyumでperlがアップデートされていた。それで、おかしくなったらしい。

Mar 24 04:02:55 rad-xen-vweb7 syslogd 1.4.1: restart.
Mar 28 05:30:30 rad-xen-vweb7 yum: Updated: 4:perl-5.8.8-40.el5_9.i386


とりあえず、perl -cで様子を見てみると以下のようにエラーになっている。

# perl -c index.cgi
Content-type: text/html

<h1>Software error:</h1>
<pre>List::Util object version 1.21 does not match bootstrap parameter 1.25 at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/XS       Loader.pm line 94.


バージョンを表示しようとやってみるが、やっぱり同様にエラー。

# perl -MList::Util -e ‘print List::Util->VERSION’
List::Util object version 1.21 does not match bootstrap parameter 1.25 at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/XSLoader.pm line 94.
Compilation failed in require.
BEGIN failed–compilation aborted.
#


cpanm -f List::Util

で、強制的にList::Utilをインストールしてみるが途中で何かしら足りないと言われて止まる。

cpan -fi List::Util
でも同様。

# cpan -fi List::Util
Unknown option: f
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Sat, 23 Jun 2012 12:51:03 GMT
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
Undefined subroutine &IO::Uncompress::Base::readonly called at /usr/lib/perl5/site_perl/5.8.8/IO/Uncompress/Base.pm line 1076.
#


ダメなので、検索してみると下記の記事がフォーラムが見つかった。

要するに、Scalar::Utilをソースから再インストールしろということらしい。

最新版は下記のリンク先ページの右側のDownloadよりダウンロードする。
Scalar::Util – search.cpan.org


以下その方法。

# mkdir tmp
# cd tmp
# wget http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.27.tar.gz
# tar -zxvf Scalar-List-Utils-1.27.tar.gz
# cd Scalar-List-Utils-1.27
# perl Makefile.PL
# gmake
# gmake test
# gmake install

これで完了。


バージョンを確認してみる。

# perl -MList::Util -e ‘print List::Util->VERSION’
1.27#

成功。

エラーを吐いていたいくつかのウェブアプリも他には特に対処せずに動くようになった。

(Visited 423 times, 1 visits today)

タグ : , ,