jump to navigation

CPAN on Ubuntu fails on bug IO/Uncompress/RawInflate.pm: solution May 30, 2008

Posted by claudio in Uncategorized.
Tags: , , , , ,
trackback

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.

About these ads

Comments»

1. Gary - May 30, 2008

Better solution:
add deb http://http.us.debian.org/debian sid main
to your /etc/apt/sources.list, then:
sudo apt-get update
sudo apt-get install libio-compress-zlib-perl

This fixed it for me today 30-May-08; it updates that libio perl lib and associated dependencies to the 2.011-1 version in the upstream debian package.

2. claudio - May 30, 2008

In case you use Ubuntu and not Debian proper, be careful mixing deb repositories: I have been bitten in the past.

I am shure 2.0.11 will arrive soon at the Ubuntu repositories, but I need to develop today… when the version arrives (of course things seems to move faster in Debian than in the 6 month semi-frozen Ubuntu), I’ll do the apt-get install.

Thanks for the suggestion.

3. Gary - May 30, 2008

Claudio, you are right — this was not a good idea. Use your original idea instead. (My way upgraded my perl to 5.10!)

4. claudio - May 30, 2008

5.10, you lucky bastard :) You get to play with the ~~ operator…

By the way, if needed you can downgrade the packages with apt-get as well…

5. nony - May 31, 2008

Why does this same problem occur just using cpan to install Bundle::CPAN? As far as I can tell, the problem was supposed to be in the apt-get versions due to package management rules. The problem isn’t in the actual perl module ON cpan is it?

However, using CPAN from the command line to install Bundle::CPAN, it installs 2.011 and STILL fails with the same command. This has been happening for about two weeks. I keep waiting for it to get fixed, but no luck.

6. nony - June 1, 2008

So here’s what I did on debian.

- Installed Etch.
- Upgraded to Lenny.
- Installed gcc and libc6-dev
- configured cpan
- installed Bundle::CPAN

That is ALL I did. And at the end of installing Bundle::CPAN, it gives me a bunch of lines like:

Make had returned bad status, install seems impossible Failed during this command:
TJENNESS/File-Temp-0.20.tar.gz : make NO
MSCHWERN/ExtUtils-MakeMaker-6.44.tar.gz : make NO

and on and on for about 10 items.

Installing the 2.011-2 version of the zlib library first also results in the same problem.

I’ve tried getting a working Bundle::CPAN install on Xubuntu, Debian etch, Debian lenny (testing), etc. No luck on a single one. Ridiculous.

7. nony - June 1, 2008

Ah hah. Stupid admin error — forgot to install build-essential. Oops!

8. Steve - June 11, 2008

did all this, Module::Build failed though, when i try and install it i get:
Test Summary Report
——————-
t/compat.t (Wstat: 256 Tests: 60 Failed: 1)
Failed test: 55
Non-zero exit status: 1
Files=26, Tests=784, 17 wallclock secs ( 0.17 usr 0.02 sys + 14.16 cusr 2.32 csys = 16.67 CPU)
Result: FAIL
Failed 1/26 test programs. 1/784 subtests failed.
make: *** [test] Error 255
KWILLIAMS/Module-Build-0.2808.tar.gz
/usr/bin/make test — NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports KWILLIAMS/Module-Build-0.2808.tar.gz
Running make install
make test had returned bad status, won’t install without force

9. claudio - June 11, 2008

If CPAN runs at all, it means that the bug above is fixed. You are probably missing a dependency for the module (you should have a look higher for a hint what exact, look when it compiles stuff and you see a “not found”).

10. mg - July 7, 2008

do “force install Scalar::Util” and then install Bundle::CPAN

11. bob - July 18, 2008

tell CPAN where make is:
cpan> o conf make /usr/bin/make

12. Ian! D. Allen - September 5, 2008

I ran an “install Bundle::CPAN” without first doing “apt-get install
build-essentials”, and that was a mistake. Many things didn’t build
fully, and CPAN wedged itself into a state where RawInflate.pm was
broken and nothing could be done. Make sure you run “apt-get install
build-essentials” first. It would be nice if CPAN would know this
somehow so that it didn’t let you fail and wedge itself.

Running “apt-get remove libcompress-raw-zlib-perl” got CPAN un-wedged and
allowed “install Bundle::CPAN” to complete; but, when I did “apt-get
install spamassassin”, it brought back the broken old version of
RawInflate.pm and CPAN was broken again! Looks like the Ubuntu package
for the compress library is too old for the current CPAN, and of course
CPAN and APT don’t share version information and get along nicely.

I managed to do something like “force install Bundle::CPAN” (or maybe
it was a force install of Zlib) to over-ride the broken RawInflate
and get CPAN working again. So Ubuntu APT thinks I have the “old”
libcompress-raw-zlib-perl installed and CPAN knows we have the new stuff.

SpamAssassin’s sa-update -D shows things are working.

13. AndyB - November 13, 2008

I was getting the same errors about line 64 in RawInflate.pm. I downloaded and installed IO-Compress-Zlib-2.015 from cpan.org. That fixed the problem for me. I tried just about all of the other suggestions above and nothing worked.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 135 other followers

%d bloggers like this: