Canfield Research Group LLC
  • Home
  • Jobs
  • Blogs
    • Company
    • On Error Do
  • Contact Us
  • Projects
    • Astronomy
  • Privacy Policy

CPAN error: Compress::Zlib::gzopen undefined

11/4/2008

2 Comments

 
During routine maintenance I noticed that CPAN was failing operate properly and giving me an error I had not seen before. (updated 2014-02-25 with related errors seen on another system)
  • Undefined subroutine &Compress::Zlib::gzopen called at /usr/lib/perl5/5.8.8/CPAN.pm line 5721
  • Use of uninitialized value in concatenation (.) or string at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Scalar/Util.pm line 30.



(Update: The error was also seen on CentoS 5.5 while installing IO::Socket::SSL via CPAN and the fix below resolved this problem)


This may have happened when I installed awstats on my CentOS5 VPS. It grabbed a yum for Compress::Zlib. I suspect something odd happened and and now CPAN fails. I lack the time right now to track this down for sure and this is a production system so doing a full YUM update is something I need to avoid for a bit.

The fix is to manually bring things into compliance. Using the YUM to obtain the perl-Package-Name would probably be a good Idea but they do not appear to be quite right. The following is what I ended up doing although the path to get here felt like 2 steps forward 1 back. All files were retrieved manually from www.cpan.org via wget (use CPAN search and use the package name as the term) and then the standard Perl mantra; perl Makefile.PL, make, make test, make install. The order of installs is important! I determined the order by examining the warnings from perl Makefile.PL and make test.
  • Scalar::Util — required because IO:Compress failed test due to XS not being in my Scalar package
  • Compress::Raw::Bzip2
  • Compress::Raw::Zlib — per Compress::Zlib makefile operation
  • IO::Compress - as of 2014-02 this includes Base and Gzip, prior to that you may need to download those separate: IO::Compress::Base and IO::Compress::Gzip (Note: This takes a long time for tests).
  • Compress::Zlib — the faulty package
After this was done all was good and CPAN now works!

2 Comments

    On Error Do

    A blog in question/answer and problem/solution format.

    Author

    Robb Canfield, CEO of Canfield Research Group.

    Archives

    February 2014
    November 2008

    Categories

    All
    Archives
    Linux
    Perl

    RSS Feed


Copyright 2018 by Canfield Research Group LLC