Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

cannot launch CPAN shell

by VultureNetHawk (Initiate)
on Oct 07, 2013 at 13:56 UTC ( #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/ 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/ line 18. BEGIN failed--compilation aborted at /System/Library/Perl/5.10.0/ 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 (Archbishop) 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), 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1057256]
Front-paged by Corion
[Discipulus]: good morning nuns and monks!

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2018-06-20 06:43 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.