CPAN Stopped being Recognized (MAC)

Discussion in 'Perl Misc' started by David Warner, Apr 19, 2012.

  1. David Warner

    David Warner Guest

    Hello Group,

    Not sure if this is the place to post this question/issue, so here we go.

    I ran the cpan utility (/usr/bin/cpan) on my Mac OSX 10.6.8 to install
    the WWW::Mechanize perl package. After installing the necessary
    supporting perl package libraries to support WWW::Mechanize, I cannot
    run cpan again.

    This is what I have tried:

    cpan Package
    sudo cpan Package
    /usr/bin/cpan Package
    sudo cpan Package
    /usr/bin/sudo /usr/bin/cpan Package

    All attempts returns the errors.

    $ sudo cpan Scrape::USPS
    Password:
    sudo: cpan: command not found
    $ cpan Scrape::USPS
    -bash: /usr/bin/cpan: Permission denied
    $ type sudo
    sudo is hashed (/usr/bin/sudo)
    $ type cpan
    cpan is hashed (/usr/bin/cpan)
    $ /usr/bin/sudo /usr/bin/cpan Scrape::USPS
    sudo: /usr/bin/cpan: command not found


    To install WWW::Mechanize, all that I typed originally was:

    sudo cpan WWW::Mechanize

    Suggestions?

    Thanks,

    David
    David Warner, Apr 19, 2012
    #1
    1. Advertising

  2. David Warner <> writes:
    > Not sure if this is the place to post this question/issue, so here we go.
    >
    > I ran the cpan utility (/usr/bin/cpan) on my Mac OSX 10.6.8 to install
    > the WWW::Mechanize perl package. After installing the necessary
    > supporting perl package libraries to support WWW::Mechanize, I cannot
    > run cpan again.
    >
    > This is what I have tried:
    >
    > cpan Package
    > sudo cpan Package
    > /usr/bin/cpan Package
    > sudo cpan Package
    > /usr/bin/sudo /usr/bin/cpan Package
    >
    > All attempts returns the errors.
    >
    > $ sudo cpan Scrape::USPS
    > Password:
    > sudo: cpan: command not found
    > $ cpan Scrape::USPS
    > -bash: /usr/bin/cpan: Permission denied


    Both of these messages together indicate that /usr/bin/cpan is missing
    execute-permissions.

    [...]

    > Suggestions?


    ls -l /usr/bin/cpan

    if this results in a file without x-permissions set, try

    sudo chmod +x /usr/bin/cpan

    alternatively, do it the old-fashioned way

    perl -MCPAN -e shell
    Rainer Weikusat, Apr 19, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carl d.
    Replies:
    1
    Views:
    376
    A. Sinan Unur
    May 10, 2005
  2. Replies:
    5
    Views:
    186
    Randy Kobes
    Oct 12, 2005
  3. MoshiachNow
    Replies:
    11
    Views:
    2,762
    Sisyphus
    Sep 6, 2006
  4. Dave Hammond

    CPAN 'shell' interface stopped working?

    Dave Hammond, Sep 7, 2006, in forum: Perl Misc
    Replies:
    6
    Views:
    162
    Dave Hammond
    Sep 13, 2006
  5. Ben Bullock
    Replies:
    12
    Views:
    272
    Ben Bullock
    Jul 8, 2008
Loading...

Share This Page