Mac Perl Problems After Feb Update

When I did my most recent upgrade (the latest Mac software updates), it broke my Perl install. In order to figure out if your Perl is broken like mine was, you will get a result like this:

beacon:mail elubow$ perl -MIO
IO object version 1.22 does not match bootstrap parameter 1.23 at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/XSLoader.pm line 94.
Compilation failed in require.
BEGIN failed--compilation aborted.

I had a little trouble finding out how to fix this. So I am posting this here in case it helps someone else out. It was a simple fix (since CPAN doesn’t work) that you have to do by hand. Go to the CPAN site and download dist IO here. Download and untar it and run the following commands:

beacon:IO-1.2301 elubow$ sudo perl Makefile.PL
Writing Makefile for IO
beacon:IO-1.2301 elubow$ sudo make install
cc -c   -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include -O3   -DVERSION=\"1.23\" -DXS_VERSION=\"1.23\"  "-I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE"   IO.c
...
<strong>Removed for brevity</strong>
...
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/IO/IO.bundle
Writing /System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/IO/.packlist
Appending installation info to /System/Library/Perl/5.8.8/darwin-thread-multi-2level/perllocal.pod

This should fix your Perl install. It also ended up that I had to run CPAN and reinstall Scalar::Util and Storable.

Posted in Mac, Perl. Tags: , , . 1 Comment »
  • Richard

    Thanks for posting this, sorted out my problem and save me a ton of time.

    Cheers!
    Richard.