IO::Compress:: Gzip 故障关键字:

perl -e "use IO::Compress::Gzip; print qq{OK\n}"    Can’t locate        IO/Compress/Gzip.pm in @INC

Can't locate object method "new" via package "IO::Compress::Gzip"

 

故障分析

Yum 安装的prel-PerlIO-Gzip 与其他的IO插件不兼容

存放路径不在系统默认存放路径下,即使使用 ln –s 创建软连接的方式到正确路径,但是依然会发生

Can't locate object method "new" via package "IO::Compress::Gzip"


 

解决方法:源码安装方式重装 IO-Compress

wget    http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/IO-Compress-2.037.tar.gz

wget http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/Compress-Raw-Bzip2-2.037.tar.gz  wget    http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/Compress-Raw-Zlib-2.037.tar.gz

各自使用

tar   包名

cd 包名

perl MakeFile.pl

make &&make install