Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by Jeri (Scribe)
on Feb 12, 2014 at 21:05 UTC ( #1074694=note: print w/replies, xml ) Need Help??


in reply to Re^2: interactive mode cpan. "cpan" doesn't work. "perl -MCPAN -e shell" does
in thread interactive mode cpan. "cpan" doesn't work. "perl -MCPAN -e shell" does

Thanks, sorry. It seemed complicated. Need to take a break.
  • Comment on Re^3: interactive mode cpan. "cpan" doesn't work. "perl -MCPAN -e shell" does

Replies are listed 'Best First'.
Re^4: interactive mode cpan. "cpan" doesn't work. "perl -MCPAN -e shell" does
by Anonymous Monk on Feb 13, 2014 at 01:08 UTC

    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
Node Status?
node history
Node Type: note [id://1074694]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2018-10-20 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (117 votes). Check out past polls.

    Notices?