0

我正在尝试更改以CPAN.pm在其中包含.gz文件的目标,CPAN.pm但由于我没有“sudo”权限,因此它拒绝了我的访问。

我的问题是如果可能的话如何卸载 CPAN 并重新安装。

这种情况有没有其他解决方案。

以下命令不起作用:

cpan o conf init
4

3 回答 3

3

您可以在中使用用户本地配置~/.cpan/CPAN/MyConfig.pm,将其放入:

$CPAN::Config = {
  'gzip' => q[/usr/bin/gzip]
};

1;

如果需要,调整gzip路径。

于 2013-06-15T20:20:21.653 回答
1

您的意思是要更改 CPAN.pm 在下载存档文件后存储它们的位置吗?有一个设置叫做keep_sources_where

% cpan
cpan[1]> o conf keep_source_where
    keep_source_where  [/Users/brian/.cpan/sources]
Type 'o conf' to view all configuration items


cpan[2]> o conf keep_source_where /some/other/dir
    keep_source_where  [/some/other/dir]
Please use 'o conf commit' to make the config permanent!

您可以查看和设置其他几个设置。它们都列在CPAN文档中。

于 2013-06-16T07:10:11.777 回答
0

The answer is

perl -MCPAN -e shell

o conf gzip /usr/bin/gzip
o conf commit

Done..... Same for everything . No need to reinstall CPAN if you want only to change some configuration.

于 2013-06-15T20:42:02.773 回答