重新配置cpan

转载:http://hi.baidu.com/kouzl/blog/item/a73c281005813804203f2e37.html

方法一:

首先删除了cpan的配置文件及相关的软件
[root@www ~]# cd /usr/lib/perl5/5.8.8/CPAN/
[root@ww CPAN]# rm Config.pm
[root@www ~]# cd /root/.cpan (这个目录是在一开始以ROOT的账号初始化cpan时创建的)
[root@www .cpan]# rm -rf *
然后手动编译配置文件Config.pm
[root@www ~]vi /usr/lib/perl5/5.8.8/CPAN/Config.pm

# This is CPAN.pm's systemwide configuration file. This file provides
# defaults for users, and the values can be changed in a per-user
# configuration file. The user-config file is being looked for as
# ~/.cpan/CPAN/MyConfig.pm.

$CPAN::Config = {
'build_cache' => q[10],
'build_dir' => q[/root/.cpan/build],
'cache_metadata' => q[1],
'commandnumber_in_prompt' => q[1],
'cpan_home' => q[/root/.cpan],
'dontload_hash' => { },
'ftp' => q[/usr/kerberos/bin/ftp],
'ftp_passive' => q[1],
'ftp_proxy' => q[],
'getcwd' => q[cwd],
'gpg' => q[/usr/bin/gpg],
'gzip' => q[/bin/gzip],
'histfile' => q[/root/.cpan/histfile],
'histsize' => q[100],
'http_proxy' => q[],
'inactivity_timeout' => q[0],
'index_expire' => q[1],
'inhibit_startup_message' => q[0],
'keep_source_where' => q[/root/.cpan/sources],
'make' => q[/usr/bin/make],
'make_arg' => q[],
'make_install_arg' => q[],
'make_install_make_command' => q[/usr/bin/make],
'makepl_arg' => q[],
'mbuild_arg' => q[],
'mbuild_install_arg' => q[],
'mbuild_install_build_command' => q[./Build],
'mbuildpl_arg' => q[],
'ncftp' => q[],
'ncftpget' => q[],
'no_proxy' => q[],
'pager' => q[/usr/bin/less],
'prerequisites_policy' => q[ask],
'scan_cache' => q[atstart],
'shell' => q[/bin/bash],
'tar' => q[/bin/tar],
'term_is_latin' => q[1],
'term_ornaments' => q[1],
'unzip' => q[/usr/bin/unzip],
'urllist' => [q[http://cpan.linuxforum.net/]],
'wget' => q[/usr/bin/wget],
};
1;
__END__

方法二:

如要重新配置CPAN,可先进入CPAN

[root@www ~]# perl -MCPAN -e shell

然后在CPAN命令行(即CPAN>)键入以下指令:

CPAN>o conf init

然后在下面的各个询问中可以改已经配置好的选项

如我修改了urllist那如果想在安装的时候从修改过的urllist中取相关的模块,需要执行下面的命令用来更新相关的资料

CPAN>reload index

CPAN>reload cpan


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值