Tag archives: cpan shell

Fixed: CPAN failed with "Undefined subroutine &Compress::Zlib::gzopen…

For some unknown reasons, CPAN on my macbook suddenly stopped working.  This is the error I got whenever I tried to use CPAN to install a module:

Catching error: “Undefined subroutine &Compress::Zlib::gzopen called at /Library/Perl/Updates/5.8.8/CPAN/Tarzip.pm line 122.\cJ” at /Library/Perl/Updates/5.8.8/CPAN.pm line 390
CPAN::shell() called at /usr/bin/cpan line 198

I found a lot of suggestions from googling for it.  The best solution for my case was to remove all Compress::Zlib (Zlib.pm) from every perl library and re-install a new one.

Blogged with the Flock Browser