Activism, Apple, Computer Science, Culture, DB, Drupal, Guitar, Languages Processing, LaTeX, Left, Linux, Mac, National Geographic, Open Source, Perl, Portugal, XML, World, ...

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

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.