Perl modules issue with Mac OS X Security Update 2009-001
Today I was installing a module within CPAN and I got systematically the same error ending as following:
[geshifilter-code] Catching error: "Undefined subroutine &Compress::Zlib::gzopen called at /System/Library/Perl/5.8.8/CPAN/Tarzip.pm line 122.\cJ" at /System/Library/Perl/5.8.8/CPAN.pm line 359 CPAN::shell() called at /usr/bin/cpan line 198 [/geshifilter-code]
After consulting my "Perl menthor" (hehe!), he asked me if I had installed the 2009-001 Mac OS X Security Update. Well it seems that this Update troubles the IO module.
Let me explain: each time you run an update with Software Update, it simply overrides your existing files. This is the main reason you shouldn't override the system Perl installation with a fresh one compiled from source, for instance.
So, getting back to our subject, let me explain how I solved that.
First of all, you have to download the IO module source:
[geshifilter-code language="bash"]
nuno@mac ~ $ wget http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/IO-1.2301.tar.gz
[/geshifilter-code]
or using curl, as wget is not shipped with Mac OS X:
[geshifilter-code language="bash"]
nuno@mac ~ $ curl -O http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/IO-1.2301.tar.gz
[/geshifilter-code]
Then, you compile and install it:
[geshifilter-code language="bash"]
nuno@mac ~ $ tar zxvf IO-1.2301.tar.gz
nuno@mac ~ $ cd IO -1.2301
nuno@mac IO-1.2301 $ perl Makefile.PL
nuno@mac IO-1.2301 $ make && sudo make install
[/geshifilter-code]
I thought it would be enough to fix the problem but an error still persisted.
[geshifilter-code]
Use of uninitialized value in concatenation (.) or string at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/Scalar/Util.pm line 30.
Catching error: "Undefined subroutine &Compress::Zlib::gzopen called at /System/Library/Perl/5.8.8/CPAN/Tarzip.pm line 122.\cJ" at /System/Library/Perl/5.8.8/CPAN.pm line 359
CPAN::shell() called at /usr/bin/cpan line 198
[/geshifilter-code]
So, according to CPAN's complaint I followed the same steps as detailed above but for Scalar::List::Utils module (source here: http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Scalar-List-Utils-1.19...).
Finally I ran CPAN and successfully installed the module I wanted. Any road, I recommend to run a CPAN upgrade to ensure all your modules are still consistent.
[geshifilter-code]
nuno@mac ~ $ sudo cpan
cpan> upgrade
[/geshifilter-code]
That's all folks :)


















Comments
LifeSaver!
Very usefull, clear, brief, right to the point
I installed "wget" through FinkCommander, simply because I didn't use Curl before.
Now I can go and install that GD module!
Un gros merci!
Thank you for the remark.
Thank you for the remark. Indeed you need 'sudo' for the 'make install'. Corrected.
Cheers!
make && make install
Thanks for posting
if I use `make && make install` I kept having error messages like
ERROR: Can't create '/System/Library/Perl/5.8.8/darwin-thread-multi-2level'
using `sudo make` and after that `sudo make install` it worked.
cpan upgrade is now finally busy upgrading again.
Spot on
Fixed my problem. Thanks!
this was very helpful
thanks
Post new comment