CPAN on Ubuntu fails on bug IO/Uncompress/RawInflate.pm: solution May 30, 2008Posted by claudio in Uncategorized.
Tags: bug, cpan, GNU/Linux, Linux, Perl, Ubuntu
apt-gettable perl modules on Ubuntu are great. A nice packager at Debian Gnu/Linux compiled the modules and included all dependencies specially for you .
This is extremely handy when you are looking for a solution for a programming problem that you know someone else solved before. You apt-get the modules you need and have a quick try.
While doing exactly this (tryng to install HTML::TextToHTML) , I discover CPAN on Ubuntu was broken:” Can’t call method “value” on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm line 64.”.
I don’t think it’s a Debian/Ubuntu problem, but rather a upstream bug. Some people have the same problem on Windows. How nice the apt-gettable modules are, there are always cases when you need to build modules not yet in the Ubuntu repositories or you need a newer version (both cases here). A non-working CPAN is not acceptable. This is what I did.
$ sudo apt-get remove libcompress-raw-zlib-perl
This will remove some perl modules dependent on this package.
$ sudo apt-get remove autoremove
This removed the following packages on my system: libio-compress-base-perl libgetopt-argvfile-perl libfile-temp-perl libpar-dist-perl libextutils-parsexs-perl libextutils-cbuilder-perl libyaml-perl.
$ apt-get install gcc libc6-dev
Install a compiler and include files.
$ sudo cpan
Configure cpan answering the questions; type “exit” to exit CPAN.
$ sudo cpan Bundle::CPAN
This will install most basic CPAN dependencies.
$ sudo cpan <module-name>
To install modules you need.