如何修改原来设置的CPAN

还是不能用,麻烦高手再帮我看看吧.本人太愚笨了,实在不知道该怎么办.相关设置如下:出现的情况和原来的一模一样
CPAN build and cache directory? [/home/gtj/.cpan]
Perform cache scanning (atstart or never)? [atstart]
Cache metadata (yes/no)? [yes]
Your terminal expects ISO-8859-1 (yes/no)? [yes]
File to save your history? [/home/gtj/.cpan/histfile]
Always try to show upload date with 'd' and 'm' command (yes/no)? [yes]
Policy on building prerequisites (follow, ask or ignore)? [ask]


here is your bzip2 program? [/usr/bin/bzip2]
Where is your gzip program? [/usr/bin/gzip]
Where is your tar program? [/bin/tar]
Where is your unzip program? [/usr/bin/unzip]
Where is your make program? [/usr/bin/make]
Where is your curl program? [/usr/bin/curl]
Warning: lynx not found in PATH
Where is your lynx program? []
Where is your wget program? [/usr/bin/wget]
Where is your ncftpget program? [/usr/bin/ncftpget]
Where is your ftp program? [/usr/bin/ftp]
Where is your gpg program? [/usr/bin/gpg]
What is your favorite pager program? [less]
What is your favorite shell? [/bin/bash]
In case you could choose, which installer would you prefer (EUMM or MB)? [EUMM]


Parameters for the 'perl Makefile.PL' command?
Typical frequently used settings:

PREFIX=~/perl # non-root users (please see manual for more hints)

Your choice: []
Parameters for the 'make' command?
Typical frequently used setting:

-j3 # dual processor system

Your choice: []
Do you want to use a different make command for 'make install'?
Cautious people will probably prefer:

su root -c make
or
sudo make
or
/path1/to/sudo -u admin_account /path2/to/make

or some such. Your choice: [/usr/bin/make]
Parameters for the 'make install' command?
Typical frequently used setting:

UNINST=1 # to always uninstall potentially conflicting files

Your choice: []


The next questions deal with Module::Build support.

A Build.PL is run by perl in a separate process. Likewise we run
'./Build' and './Build install' in separate processes. If you have any
parameters you want to pass to the calls, please specify them here.

Parameters for the 'perl Build.PL' command?
Typical frequently used settings:

--install_base /home/xxx # different installation directory

Your choice: []
Parameters for the './Build' command?
Setting might be:

--extra_linker_flags -L/usr/foo/lib # non-standard library location

Your choice: []
Do you want to use a different command for './Build install'?
Sudo users will probably prefer:

su root -c ./Build
or
sudo ./Build
or
/path1/to/sudo -u admin_account ./Build

or some such. Your choice: [./Build]
Parameters for the './Build install' command?
Typical frequently used setting:

--uninst 1 # uninstall conflicting files

Your choice: []


Sometimes you may wish to leave the processes run by CPAN alone
without caring about them. Because the Makefile.PL sometimes contains
question you're expected to answer, you can set a timer that will
kill a 'perl Makefile.PL' process after the specified time in seconds.

If you set this value to 0, these processes will wait forever. This is
the default and recommended setting.

Timeout for inactivity during {Makefile,Build}.PL? [0]


If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.

Your ftp_proxy?
Your http_proxy?
Your no_proxy? [localhost]
You have no /home/gtj/.cpan/sources/MIRRORED.BY
I'm trying to fetch one
LWP not available
LWP not available
CPAN: Net::FTP loaded ok
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
Could not connect to host 'ftp.perl.org' with Net::FTP
Fetching with Net::FTP
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
Could not connect to host 'ftp.perl.org' with Net::FTP

Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
http://www.perl.org/CPAN/MIRRORED.BY
curl: (6) Couldn't resolve host 'www.perl.org'

Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
http://www.perl.org/CPAN/MIRRORED.BY.gz
curl: (6) Couldn't resolve host 'www.perl.org'

Trying with "/usr/bin/wget -O /home/gtj/.cpan/sources/MIRRORED.BY" to get
http://www.perl.org/CPAN/MIRRORED.BY
--13:09:26-- http://www.perl.org/CPAN/MIRRORED.BY
=> `/home/gtj/.cpan/sources/MIRRORED.BY'
Resolving www.perl.org... failed: Name or service not known.

Trying with "/usr/bin/wget -O /home/gtj/.cpan/sources/MIRRORED.BY" to get
http://www.perl.org/CPAN/MIRRORED.BY.gz
--13:09:26-- http://www.perl.org/CPAN/MIRRORED.BY.gz
=> `/home/gtj/.cpan/sources/MIRRORED.BY'
Resolving www.perl.org... failed: Name or service not known.

Trying with "/usr/bin/ncftpget" to get
http://www.perl.org/CPAN/MIRRORED.BY
NcFTPGet 3.1.3
Usages:
ncftpget [flags] remote-host local-dir remote-path-names... (mode 1)
ncftpget -f login.cfg [flags] local-dir remote-path-names... (mode 2)
ncftpget [flags] ftp://url.style.host/path/name (mode 3)
ncftpget -c [flags] remote-host remote-path-name > stdout (mode 4)
ncftpget -c [flags] ftp://url.style.host/path/name > stdout (mode 5)

Flags:
-u XX Use username XX instead of anonymous.
-p XX Use password XX with the username.
-P XX Use port number XX instead of the default FTP service port (21).
-d XX Use the file XX for debug logging.
-a Use ASCII transfer type instead of binary.
-t XX Timeout after XX seconds.
-v/-V Do (do not) use progress meters.
-f XX Read the file XX for host, user, and password information.
-A Append to local files, instead of overwriting them.
-z/-Z Do (do not) not try to resume downloads (default: -z).
-E Use regular (PORT) data connections.
-F Use passive (PASV) data connections (default).
-DD Delete remote file after successfully downloading it.
-b Run in background (submit job to "ncftpbatch" and run).
-bb Same as "-b" but queue only (do not run "ncftpbatch").
-B XX Try setting the SO_RCVBUF size to XX.
-r XX Redial XX times until connected.
-W XX Send raw FTP command XX after logging in.
-X XX Send raw FTP command XX after each file transferred.
-Y XX Send raw FTP command XX before logging out.
-R Recursive mode; copy whole directory trees.
-T Do not try to use TAR mode with Recursive mode.

Examples:
ncftpget ftp.freebsd.org . /pub/FreeBSD/README.TXT /pub/FreeBSD/index.html
ncftpget ftp.gnu.org /tmp '/pub/gnu/README.*'
ncftpget ftp://ftp.freebsd.org/pub/FreeBSD/README.TXT
ncftpget -R ftp.ncftp.com /tmp /ncftp (ncftp is a directory)
ncftpget -u gleason -p my.password Bozo.probe.net . '/home/mjg/.*rc'
ncftpget -u gleason Bozo.probe.net . /home/mjg/foo.txt (prompt for password)
ncftpget -f Bozo.cfg '/home/mjg/.*rc'
ncftpget -c ftp.freebsd.org /pub/FreeBSD/README.TXT | /usr/bin/more
ncftpget -c ftp://ftp.freebsd.org/pub/FreeBSD/README.TXT | /usr/bin/more
ncftpget -a -d /tmp/debug.log -t 60 ftp.wustl.edu . '/pub/README*'

Library version: LibNcFTP 3.1.3 (March 4, 2002).

This is a freeware program by Mike Gleason (mgleason@ncftp.com).
This was built using LibNcFTP (http://www.ncftp.com/libncftp).
到此之后就没有反应了
只好按"q"键.
变成
Trying with "/usr/bin/ncftpget" to get
http://www.perl.org/CPAN/MIRRORED.BY.gz

Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
curl: (6) Couldn't resolve host 'ftp.perl.org'

Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
curl: (6) Couldn't resolve host 'ftp.perl.org'

Trying with "/usr/bin/wget -O /home/gtj/.cpan/sources/MIRRORED.BY" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
--13:11:24-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
=> `/home/gtj/.cpan/sources/MIRRORED.BY'
Resolving ftp.perl.org... failed: Name or service not known.

Trying with "/usr/bin/wget -O /home/gtj/.cpan/sources/MIRRORED.BY" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
--13:11:24-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
=> `/home/gtj/.cpan/sources/MIRRORED.BY'
Resolving ftp.perl.org... failed: Name or service not known.

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

Trying with "/usr/bin/ncftpget" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
ftp.perl.org: unknown host.
ncftpget: cannot open ftp.perl.org: unknown host.

As a last ressort we now switch to the external ftp command '/usr/bin/ftp'
to get '/home/gtj/.cpan/sources/MIRRORED.BY'.

Doing so often leads to problems that are hard to diagnose, even endless
loops may be encountered.

If you're victim of such problems, please consider unsetting the ftp
config variable with

o conf ftp ""
o conf commit

Issuing "/usr/bin/ftp -n"

Trying with external ftp to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
Going to send the dialog
open ftp.perl.org
user anonymous root@node80.local
lcd /home/gtj/.cpan/sources
cd /
cd pub
cd CPAN
bin
get MIRRORED.BY MIRRORED.BY
quit

ftp: Name or service not known
Not connected.
Local directory now /home/gtj/.cpan/sources
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.

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 MIRRORED.BY
CPAN.pm needs at least one URL where it can fetch CPAN files from.

Please enter your CPAN site: []
就不知道输入什么了.好像无论输入什么都不行,也退不出去.我只好关掉窗口,再重新打开.(我用putty登陆服务器设置的)
我用root帐号登陆,所有的设置也是默认,结果跟这个一样.
服务器本身的网络没有问题.
服务器本身的网络没有问题么?
服务器能否访问国外的网络?难道你的服务器在校园网内没有出国的权限?
从错误来看,是域名无法解析,与网络环境有关吧?
请把你服务器网络情况介绍一下,有能力访问互连网的么(能访问国内?国外?)?
如果你的服务器能访问国内的网站,试试这样,在:[quote]Please enter your CPAN site: [][/quote]的时候,输入 [quote]http://mirror.vmmatrix.net/CPAN[/quote]
然后继续
哦.可能就是这个原因.真是.
哦.可能就是这个原因.真是害苦人了

Please enter your CPAN site: [] http://mirror.vmmatrix.net/CPAN
Enter another URL or RETURN to quit: [] http://mirror.vmmatrix.net/CPAN
Enter another URL or RETURN to quit: [] http://google.com
Enter another URL or RETURN to quit: [] http://www.sina.com

非常感谢您的详细耐心的回复!

要是是服务器网络设置问题,是不是很难修改?我们的服务器是文字界面的,没有图形界面
我换了一台服务器,可以练到外部网络,但是安装到Enter another URL or RETURN to quit: []
时,怎么退出?
在perl Makefile.PL时出现warning.没有问题吧
....--[quote] Enter an.
....
[quote] Enter another URL or RETURN to quit: [][/quote]
-----------------------
这个要你输入的是 CPAN 仓库网站及其镜像网站的地址(mirror.vmmatrix.net/CPAN 就是一个 CPAN 的国内镜像,如果服务器无法访问国外,就加这样的国内镜像即可正常通过 CPAN 安装模块),不是什么 www.sina.com 之类的....汗
如果你不想输入了,就按照提示(注意看红色部分) "[color=red]Enter[/color] another URL or [color=red]RETURN to quit[/color]",把后面需要输入的地方留空,什么也不写,只要[color=red]回车[/color]一下即可...




   

终于安装好了--谢谢! 终于安装好了
谢谢!
还有些疑问:我是在自己目录/home/gtj/bin/,如果选择的都是默认的,安装的模块在哪个目录,我要是调用的话是不是需要加包的目录?
[quote]perl -e 'print qq.
[quote]perl -e 'print qq($_,\n) for @INC'[/quote]
如果你自己写的模块,不放在以上脚本输出中所包含的目录下 ,比如放在 /usr/var/mymodules 下
则在你自己的程序前加上一句:[quote]use lib '/usr/var/mymodules';[/quote]




   

谢谢!这里真是一个好地方!.