By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,333 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,333 IT Pros & Developers. It's quick & easy.

CPAN through proxy which needs authentication

P: 4
Dear friends,

I am trying to use CPAN for installing some perl modules. i am using a ubuntu system, which has internet connection through lan and authenticated proxy.

when trying to install cpan.pm , it gives the following error, can any one help,

You have no /root/.cpan/sources/MIRRORED.BY
I'm trying to fetch one
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY
Fetching with LWP:
http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY.gz
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY
Fetching with Net::FTP
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz

Trying with "/usr/bin/lynx -source" to get
http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY

Looking up proxy.iitm.ac.in:3128
Making HTTP connection to proxy.iitm.ac.in:3128
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Can't retry with proxy authorization! Contact the server's WebMaster.
Can't Access `http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY'
Alert!: Unable to access document.

lynx: Can't access startfile

Trying with "/usr/bin/lynx -source" to get
http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY.gz

Looking up proxy.iitm.ac.in:3128
Making HTTP connection to proxy.iitm.ac.in:3128
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Can't retry with proxy authorization! Contact the server's WebMaster.
Can't Access `http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY.gz'
Alert!: Unable to access document.

lynx: Can't access startfile

Trying with "/usr/bin/ncftpget" to get
http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY
NcFTPGet 3.2.0
....
....
.....
....

Trying with "/usr/bin/ncftpget" to get
http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY.gz

Trying with "/usr/bin/wget -O -" to get
http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY
--12:06:58-- http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY
=> `-'
Resolving proxy.iitm.ac.in... 10.93.0.31, 10.93.0.32
Connecting to proxy.iitm.ac.in|10.93.0.31|:3128...
connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required
12:06:58 ERROR 407: Proxy Authentication Required.


Trying with "/usr/bin/wget -O -" to get
http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY.gz
--12:06:58-- http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY.gz
=> `-'
Resolving proxy.iitm.ac.in... 10.93.0.32, 10.93.0.31
Connecting to proxy.iitm.ac.in|10.93.0.32|:3128... connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required
12:06:58 ERROR 407: Proxy Authentication Required.


Trying with "/usr/bin/lynx -source" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY




Looking up proxy.iitm.ac.in:3128ftp:
Unable to locate remote host proxy.iitm.ac.in:3128ftp:.
Alert!: Unable to connect to FTP host.
Looking up proxy.iitm.ac.in:3128ftp:
Unable to locate remote host proxy.iitm.ac.in:3128ftp:.
Alert!: Unable to connect to FTP host.

lynx: Can't access startfile ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY

Trying with "/usr/bin/lynx -source" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz


Looking up proxy.iitm.ac.in:3128ftp:
Unable to locate remote host proxy.iitm.ac.in:3128ftp:.
Alert!: Unable to connect to FTP host.
Looking up proxy.iitm.ac.in:3128ftp:
Unable to locate remote host proxy.iitm.ac.in:3128ftp:.
Alert!: Unable to connect to FTP host.

lynx: Can't access startfile ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz

Trying with "/usr/bin/ncftpget" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY



Could not connect to ftp.perl.org -- try again later: Connection timed out.
Could not connect to ftp.perl.org -- try again later: Connection timed out.
Could not connect to ftp.perl.org -- try again later: Connection timed out.
ncftpget: cannot open ftp.perl.org: could not connect to remote host, but can try again.

Trying with "/usr/bin/ncftpget" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz
Could not connect to ftp.perl.org -- try again later: Connection timed out.
Could not connect to ftp.perl.org -- try again later: Connection timed out.
Could not connect to ftp.perl.org -- try again later: Connection timed out.
ncftpget: cannot open ftp.perl.org: could not connect to remote host, but can try again.

Trying with "/usr/bin/wget -O -" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY
--12:12:32-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY
=> `-'
Resolving proxy.iitm.ac.in... 10.93.0.31, 10.93.0.32
Connecting to proxy.iitm.ac.in|10.93.0.31|:3128... connected.
Logging in as anonymous ...
Error in server response, closing control connection.
Retrying.
......
.....
.....
.....
--15:25:42-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.gz
(try:20) => `-'
Connecting to proxy.iitm.ac.in|10.93.0.31|:3128... connected.
Logging in as anonymous ...
Error in server response, closing control connection.
Giving up.

Issuing "/usr/bin/ftp -n"
ftp: connect to address 153.106.5.70: Connection timed out
Trying 196.25.240.137...
ftp: connect: Connection timed out
Not connected.
Local directory now /root/.cpan/sources
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Bad luck... Still failed!
Can't access URL ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/MIRRORED.BY.

Please check, if the URLs I found in your configuration file
(http://cpan.enstimac.fr/MIRRORED.BY/,
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/) are valid. The urllist can be
edited. E.g. with 'o conf urllist push ftp://myurl/'

Could not fetch MIRRORED.BY
Enter another URL or RETURN to quit: [] New set of picks:
http://cpan.enstimac.fr/MIRRORED.BY/
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/


commit: wrote /etc/perl/CPAN/Config.pm
Aug 9 '07 #1
Share this Question
Share on Google+
7 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
Dear friends,

I am trying to use CPAN for installing some perl modules. i am using a ubuntu system, which has internet connection through lan and authenticated proxy.

when trying to install cpan.pm , it gives the following error, can any one help,

Looking up proxy.iitm.ac.in:3128
Making HTTP connection to proxy.iitm.ac.in:3128
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Can't retry with proxy authorization! Contact the server's WebMaster.
Can't Access `http://cpan.enstimac.fr/MIRRORED.BY/MIRRORED.BY'
Alert!: Unable to access document.
Ok, someone correct me if I am wrong please, but I believe that when you originally configured the CPAN interface (upon first run), there was an option within the multitude of questions you are asked regarding whether or not you are using a Proxy server. If that was answered "no", then it will not know how to use the proxy and you will have to re-run the CPAN setup again to setup the proxy piece.

Here are the instructions for starting the reconfiguration:

Start the CPAN interface with:

perl -MCPAN -e shell

then, once at the CPAN prompt, type:

cpan> o conf init

From there, it is up to you to walk through the configuration.

Regards,

Jeff
Aug 9 '07 #2

P: 4
Thanks a lot for your help. kindly see below my configuration of cpan.


CPAN::Config options from /etc/perl/CPAN/Config.pm:
commit Commit changes to disk
defaults Reload defaults from disk
init Interactive setting of all options

build_cache 10
build_dir /root/.cpan/build
cache_metadata 1
cpan_home /root/.cpan
cpan_version_check 1
dontload_hash
ftp /usr/bin/ftp
ftp_proxy ftp://proxy.iitm.ac.in:3128
getcwd cwd
gpg /usr/bin/gpg
gzip /bin/gzip
histfile /root/.cpan/histfile
histsize 100
http_proxy http://proxy.iitm.ac.in:3128
inactivity_timeout 0
index_expire 1
inhibit_startup_message 0
keep_source_where /root/.cpan/sources
lynx /usr/bin/lynx
make /usr/bin/make
make_arg -j3
make_install_arg UNINST=1
makepl_arg PREFIX=~/perl
ncftpget /usr/bin/ncftpget
no_proxy localhost
pager /usr/bin/less
prerequisites_policy ask
proxy_pass antivirus
proxy_user antivirus
scan_cache atstart
shell /bin/bash
tar /bin/tar
term_is_latin 1
unzip /usr/bin/unzip
urllist
http://cpan.enstimac.fr/MIRRORED.BY/
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY/
wget /usr/bin/wget
Aug 9 '07 #3

numberwhun
Expert Mod 2.5K+
P: 3,503
Wow, not sure. If that username and passwd work for you normally, and the address of the proxy server(s) is correct, then that should work, IMHO.

Regards,

Jeff
Aug 9 '07 #4

P: 4
dear friends, is there any way to get perl modules installed without using cpan.

please suggest,

thanks

chandru
Aug 10 '07 #5

numberwhun
Expert Mod 2.5K+
P: 3,503
You certainly can! All you need to do is read the perlmodinstall page to figure out how.

Regards,

Jeff
Aug 10 '07 #6

miller
Expert 100+
P: 1,089
perldoc perlmodinstall

But I would encourage you strongly to use CPAN.
cpanfaq How do I install Perl Modules?

Good luck,
- Miller
Aug 11 '07 #7

P: 4
thanks a lot frnds. i resolved my problem by using ntlmaps for proxy authentication.

now i am facing a problem using CVS to fetch marc-record

the error i am encountering is the following

":2401 connection timed out"

give me some idea on how to do CVS through a proxy.

regards
chandru
Aug 13 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.