Fixing Perl after MacOS X Security Update 2009-001

1 minute read

Apple’s first security update of 2009 for MacOS X may solve some security issues in the OS but it also seriously breaks Perl by installing old versions of some modules along with Perl. It looks like Perl works okay for things that MacOS X uses it for, but if you do development using it or have installed other modules than what it came bundled with you may find that it no longer works. The first thing you need to do to fix it is reinstall the IO module. You’ll probably need to download it from CPAN by hand as the CPAN shell itself is broken by the update.

The current version (as of the time I’m writing this article) is 1.2301 - you can find it at http://search.cpan.org/~gbarr/IO-1.2301/IO.pm

You’ll need to download it, untar it and then rebuild and reinstall it. Open up a terminal window and


% sudo -s
Password: xxxx
# tar xvfz IO-1.2301.tar.gz
# cd IO-1.2301
# perl Makefile.PL
# make
# make test
# make install

After you’ve fixed IO, you may find that you get this message:

Weak references are not implemented in the version of perl at …

You’ll need to reinstall Scalar::Util

Fortunately CPAN should now work, so it’ll be a little easier.


# cpan
cpan> install Scalar::Util

After this I had to reinstall a few more modules that I had previously updated but I didn’t run into any other mysterious problems.

Updated: