[ERROR] Can't locate object method "install" via package

Posted by jacqui maher on March 11, 2008 at 01:14 PM

In case anyone else runs into this…

I was installing NCPL today when I ran into a missing CPAN module. I used to do a lot of Perl programming back in the day but I have to admit it’s been awhile since I’ve installed a CPAN module.

   1  [root@server NCPL-1.000050]# perl Makefile.PL 
2 ExtUtils::MakeMaker v6.31, required for 'perl Makefile.PL' via CPAN


Hrm, ok. I remember doing this with CPAN’s interactive shell…

   1  [root@server NCPL-1.000050]# perl -MCPAN -e 'install ExtUtils::MakeMaker'
2 Can't locate object method "install" via package "ExtUtils::MakeMaker" at -e line 1.


Uhmm.. ok. What the?

I googled around trying to figure out why this was causing an error on the method “install” when I suddenly realized: this is a brand new server. No one has ever run perl -MCPAN on it, I would bet.

   1  [root@server NCPL-1.000050]# perl -MCPAN -e shell
2
3 /usr/lib/perl5/5.8.8/CPAN/Config.pm initialized.
4
5
6 CPAN is the world-wide archive of perl resources. It consists of about
7 100 sites that all replicate the same contents all around the globe.
8 Many countries have at least one CPAN site already. The resources
9 found on CPAN are easily accessible with the CPAN.pm module. If you
10 want to use CPAN.pm, you have to configure it properly.
11
12 If you do not want to enter a dialog now, you can answer 'no' to this
13 question and I'll try to autoconfigure. (Note: you can revisit this
14 dialog anytime later by typing 'o conf init' at the cpan prompt.)
15
16 Are you ready for manual configuration? [yes] yes


AHA!! It just needed to be configured. That was easy :)

Hierarchy: previous, next

Comments

There are 0 comments on this post. Post yours →

Post a comment

Required fields in bold.