Home » OS » Linux » Received ‘Can’t call method “value” on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm’ on Ubuntu 8.04 Server (Hardy Heron)

Received ‘Can’t call method “value” on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm’ on Ubuntu 8.04 Server (Hardy Heron)

On my media server, I wanted to set up Perl’s CPAN but when I ran install Bundle::CPAN, I ctrl-c’d out of it when I noticed that bzip2 wasn’t installed.  Silly me.  Soon after I started receiving:

Can’t call method “value” on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm

Reinstalling Perl and all the related ubuntu packages doesn’t fix it, nor does removing the ~root/.cpan dir.  There is an easy workaround though.

aptitude remove libcompress-raw-zlib-perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Building tag database... Done      
The following packages are BROKEN:
  libio-compress-zlib-perl 
The following packages have been kept back:
  bind9-host dnsutils libbind9-30 libisccfg30 
The following packages will be REMOVED:
  libcompress-raw-zlib-perl 
0 packages upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
Need to get 0B of archives. After unpacking 319kB will be freed.
The following packages have unmet dependencies:
  libio-compress-zlib-perl: Depends: libcompress-raw-zlib-perl (>= 2.008) but it is not installable
Resolving dependencies...
The following actions will resolve these dependencies:

Remove the following packages:
apparmor-utils
libcompress-zlib-perl
libio-compress-zlib-perl
libmp3-tag-perl
librpc-xml-perl
libwww-perl
libxml-parser-perl
ubuntu-standard

Score is 592

Accept this solution? [Y/n/q/?] 

Make a note of the packages that it will remove, then tell it to go ahead. It will remove these packages!

Start cpan, and type in

install Bundle::CPAN

When it is complete, reinstall the ubuntu packages that you removed earlier (for example):

aptitude install apparmor-utils libcompress-zlib-perl libio-compress-zlib-perl libmp3-tag-perl librpc-xml-perl libwww-perl libxml-parser-perl ubuntu-standard

That’s it. Your cpan is working again 🙂

Share Button

Comments

  1. Matt says:

    Hi,

    Googled the same problem and came to your website. I followed your instructions, but I still get the same error… do you have any followups? I’m trying to install WWW::Mechanize.

    Thanks,
    Matt

  2. Hi Matt,

    I haven’t run across the problem where the procedure above doesn’t work. You may want to ask on Perlmonks. They usually have the answers right away.

    Jason

  3. 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.

  4. Rotney says:

    Oh thank you so much, this worked wondefuly! Life without CPAN is no life at all, …

  5. Jason L says:

    Removing RawInflate.pm fixed this for me. Then install Bundle::CPAN and I was good. nothing else from any other posts worked.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Facebook login by WP-FB-AutoConnect