CPAN Stopped being Recognized (MAC)

D

David Warner

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
 
R

Rainer Weikusat

David Warner said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top