Perl安装坏了

时间:2012-03-02 14:12:18

标签: perl

我无法在perl 5.8.8中安装任何模块。尝试安装任何内容时出现此错误消息:

Global symbol "%Config" requires explicit package name at /usr/lib/perl5/5.8.8/File/Copy.pm line 83.
Global symbol "%Config" requires explicit package name at /usr/lib/perl5/5.8.8/File/Copy.pm line 83.
Global symbol "%Config" requires explicit package name at /usr/lib/perl5/5.8.8/File/Copy.pm line 83.
Compilation failed in require at /usr/lib/perl5/5.8.8/CPAN.pm line 51.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.8/CPAN.pm line 51.
Compilation failed in require at /usr/lib/perl5/5.8.8/App/Cpan.pm line 183.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.8/App/Cpan.pm line 183.
Compilation failed in require at /usr/bin/cpan line 8.
BEGIN failed--compilation aborted at /usr/bin/cpan line 8.

请帮忙。我试过谷歌搜索,但大多数点击假设约use strict。就我而言,似乎我的装置已经坏了。

1 个答案:

答案 0 :(得分:3)

File::Copy正在这样做:

use Config;

以后

if ((($Config{d_symlink} && $Config{d_readlink}) || $Config{d_link}) &&

如果@INC中有一个名为Config.pm的文件(包括您运行代码的目录中),它将优先于Perl内置的Config模块,{{ 1}}将不再被赋予File::Copy哈希值,因此%Config将会中断。

解决方案是将违规模块命名为其他内容。