Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-05-2008, 02:46 AM   #1
Registered: Jun 2008
Location: India
Posts: 109

Rep: Reputation: 15
Thumbs up cpan command not working


When ever i give cpan command the cpan prompt is coming. But the problem is when i give any installations like
install DBD::mysql or Net::SNMP etc.,

I am getting the output like this

Local directory now /root/.cpan/sources/modules
Not connected.
Not connected.

Can't access URL

Please check, if the URLs I found in your configuration file () are valid.
The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'

Could not fetch modules/
Going to write /root/.cpan/Metadata
Warning: Cannot install DBD::mysql, don't know what it is.

How to overcome this issue.

Old 11-05-2008, 10:53 AM   #2
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403Reputation: 2403

If I understand correctly, cpan has never worked correctly.

First that comes to mind: Did you configure cpan?

- Enter the cpan shell (perl -MCPAN -eshell), type o conf and hit enter. A list of settings is shown, amongst other things you find a list of ftp sites (urllist, near the bottom of the list). All items in the list can be configured (you are forced to do so on first use, if I remember correctly). If you want to (re-)configure everything: o conf init.

Second: The error message also suggest the lack of a configuration file (...found in your configuration file () are..., there is no entry between the ().

Thirdly: Did you have a working internet connection when you tried it? (You have to).

Hope this helps.
Old 11-28-2008, 09:14 AM   #3
Registered: Nov 2007
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71

Rep: Reputation: 15

If you want to install a CPAN module like Net::SNMP you can download it from the CPAN web page and then upload it to your server and install it manually, it is not difficult. Just check the README file and there you can find how to install.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cpan help unixshell101 Linux - Software 5 07-06-2007 10:45 PM
cpan prob unixshell101 Linux - Software 1 07-05-2007 02:17 AM
cpan> locate -u Unknown shell command 'locate -u'. Type ? for help. sharad2005 Linux From Scratch 1 08-04-2006 12:40 AM
How to Reconfigure CPAN amer_58 Linux - Newbie 1 04-19-2005 05:47 AM question hcclnoodles Linux - Software 2 09-28-2004 03:08 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration