Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: interactive mode cpan. "cpan" doesn't work. "perl -MCPAN -e shell" does

by Anonymous Monk
on Feb 12, 2014 at 18:40 UTC ( [id://1074665]=note: print w/replies, xml ) Need Help??


in reply to interactive mode cpan. "cpan" doesn't work. "perl -MCPAN -e shell" does

What?

Its simple, delete the existing cpan file, and re-install CPAN

  • Comment on Re: interactive mode cpan. "cpan" doesn't work. "perl -MCPAN -e shell" does

Replies are listed 'Best First'.
Re^2: interactive mode cpan. "cpan" doesn't work. "perl -MCPAN -e shell" does
by Jeri (Scribe) on Feb 12, 2014 at 20:51 UTC
    haha really?
      Thanks, sorry. It seemed complicated. Need to take a break.

        Dude :) yes really

        When you install modules that install perl "EXE_FILES" their shebang gets rewritten to point to the perl doing the installing

        If you uninstall/remove/delete... that perl but the "EXE_FILE" that was installed using that perl remains ... this case your "cpan" file ... then its probably pointing to the wrong perl, one which doesn't exist ... thus the error message ( from your shell )

        So, cheapest way to fix it, is remove the offending file

        At this point, if the other perl is in your path, trying to execute cpan should call the new perls cpan file which will have the correct shebang for the new perl and call the correct perl

        If this isn't the case, and there just is no cpan file anymore, this is where reinstalling CPAN module comes in, it will install cpan EXE_FILE with correct shebang

        You can always look inside the "cpan" file you're trying to execute to see the paths it contains

        cpan probably isn't the only file with the wrong shebang

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1074665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-23 23:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found