CPAN on Lion

 CPAN, the Comprehensive Perl Archive Network is a free community provided library of Perl programs.

Installing CPAN

Here are instructions for upgrading 64-bit CPAN on OS X 10.7 Lion, tested Feb 15, 2012 with 10.7.3. I had previously installed CPAN on Snow Leopard.

Prerequisites

Install Process

After checking my environment, I did sudo -H cpan. CPAN started and asked if I wanted it to set as many default options as possible. I said yes, and it appeared to work. Then CPAN asked if it should choose the best mirror sites for me, and I said yes. This was a mistake. When I executed the r command, CPAN was unable to find any information; none of the sites it had chosen were available. The urllist that was set up was apparently useless. I checked a Snow Leopard machine and discovered that it had an empty urllist, so I did o conf urllist pop five times, to empty the list. Executing r worked, and showed many modules out of date.

I was then able to install modules from the command line. I did install CPAN and reload cpan to upgrade CPAN to the latest version, and this worked.

When I did install DBD::mysql, the install failed, saying it could not find libmysqlclient.18.dylib. Googled and found http://probably.co.uk/problems-installing-dbdmysql-on-os-x-snow-leopard.html . It suggested

 sudo install_name_tool -id /usr/local/mysql/lib/libmysqlclient.18.dylib\
   /usr/local/mysql/lib/libmysqlclient.18.dylib

When I re-tried install DBD::mysql, it succeeded. I finished up by

Upgrading Other Modules

Since so many modules were out of date, I executed the CPAN command upgrade and let it run. It ground away for several hours, occasionally asking a question: I took the default answers. These modules did not compile:

BerkeleyDB                     0.43      0.50  PMQS/BerkeleyDB-0.50.tar.gz
CORBA::IDL                     2.60      2.64  PERRAD/CORBA-IDL-2.64.tar.gz
CPAN::Meta                 2.112150  2.120351  DAGOLDEN/CPAN-Meta-2.120351.tar.gz
CPAN::Meta::YAML              0.003     0.007  DAGOLDEN/CPAN-Meta-YAML-0.007.tar.gz
JSON::PP                    2.27104   2.27200  MAKAMAKA/JSON-PP-2.27200.tar.gz
NetAddr::IP                   4.037     4.058  MIKER/NetAddr-IP-4.058.tar.gz
Version::Requirements      0.101020  0.101022  RJBS/Version-Requirements-0.101022.tar.gz
AnyDBM_File                    1.00      1.01  FLORA/perl-5.15.4.tar.gz
Attributes                     0.12      2.60  PERRAD/CORBA-IDL-2.60.tar.gz
DynaLoader                     1.10      1.15  NWCLARK/perl-5.8.6.tar.gz
Error::Simple                 undef         0  SHLOMIF/Error-0.17017.tar.gz
I18N::Langinfo                 0.03      0.07  JESSE/perl-5.13.9.tar.gz
INTEGER                        1.00      1.93  SHERZODR/Class-PObject-2.17.tar.gz
IO::Tty::Constant             undef      0.04  GBARR/IO-Tty-0.04.tar.gz
Inline::C                      0.46      0.50  SISYPHUS/Inline-0.50.tar.gz
Mail::SPF                    v2.008    v2.8.0  JMEHNLE/mail-spf/Mail-SPF-v2.8.0.tar.gz
Moose::Util::TypeConstraints::OptimizedConstraints      1.21    2.0004  DOY/Moose-2.0004.tar.gz
PerlIO::scalar                 0.08      0.12  RJBS/perl-5.15.2.tar.bz2
SVN::Core                        ..    1.6.12  MSCHWERN/Alien-SVN-v1.6.12.1.tar.gz
version::vpp                   0.88      0.96  JPEACOCK/version-0.96.tar.gz

So far these failures have not caused me any discernible problem, so I am not worrying about them.

Home | FAQ © 2010-2012, Tom Van Vleck updated 2012-04-04 19:04