CPAN Stopped being Recognized (MAC)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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
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




Re: CPAN Stopped being Recognized (MAC)

Quoted text here. Click to load it

Both of these messages together indicate that /usr/bin/cpan is missing


Quoted text here. Click to load it

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

Site Timeline