Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

cannot launch CPAN shell

by VultureNetHawk (Initiate)
on Oct 07, 2013 at 13:56 UTC ( [id://1057256]=perlquestion: print w/replies, xml ) Need Help??

VultureNetHawk has asked for the wisdom of the Perl Monks concerning the following question:

So, I am using a Mac OS X v10.6.8. I have installed some modules via CPAN. Now when I try to launch the CPAN shell, I get the following error text:

Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at /System/Library/Perl/5.10.0/CPAN.pm line 18. BEGIN failed--compilation aborted at /System/Library/Perl/5.10.0/CPAN.pm line 18. Compilation failed in require at /usr/bin/cpan5.10.0 line 176. BEGIN failed--compilation aborted at /usr/bin/cpan5.10.0 line 176.

I think the modules I have installed might have messed with the native Mac Perl? If there is no fix, is there any way to revert to a pristine install?

Replies are listed 'Best First'.
Re: cannot launch CPAN shell
by marto (Cardinal) on Oct 07, 2013 at 14:06 UTC

    Yes, messing with the system perl can result in an unstable machine. If you took a backup before doing this, now is the time to restore. If not, consider this an unfortunate lesson. Backups are a good idea.

    The first thing I'd suggest would be to go down the Disk Utilities -> Repair routine, let the system determine what permissions things should have, and reassign them accordingly. If that does not work I'd suggest looking at using Pacifist and restoring these files:

    "This is useful, for instance, if an application which is installed by the operating system becomes damaged and needs to be reinstalled without the hassle of reinstalling all of Mac OS X"

    For future reference the XCode alternative I mention can be found here.

    Update: To address your questions in the CB regarding the installation of your own Perl elsewhere on the system (which is a good idea), http://perlbrew.pl removes some effort in installing and maintaining Perl (or multiple Perls) on your system. It can also be used to automate testing your code against multiple versions of Perl. That said, the README has an explanation of the 3 lines required to install Perl to a path of your choice. See also INSTALL.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1057256]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found