从 12.04 升级到 14.04 后,几个 perl 包停止工作。
例如,cpan
给我:
Attempt to reload Scalar/Util.pm aborted.
Compilation failed in require at /usr/local/share/perl/5.18.2/CPAN/Meta/Requirements.pm line 35.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.18.2/CPAN/Meta/Requirements.pm line 35.
Compilation failed in require at /usr/share/perl/5.18/CPAN/Distribution.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl/5.18/CPAN/Distribution.pm line 7.
Compilation failed in require at /usr/share/perl/5.18/CPAN.pm line 25.
BEGIN failed--compilation aborted at /usr/share/perl/5.18/CPAN.pm line 25.
Compilation failed in require at /usr/share/perl/5.18/App/Cpan.pm line 219.
BEGIN failed--compilation aborted at /usr/share/perl/5.18/App/Cpan.pm line 219.
Compilation failed in require at /usr/local/bin/cpan line 9.
BEGIN failed--compilation aborted at /usr/local/bin/cpan line 9.
并re.pl
给我:
Perl API version v5.14.0 of List::Util does not match v5.18.0 at /usr/share/perl/5.18/XSLoader.pm line 92.
Compilation failed in require at /home/abc/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Scalar/Util.pm line 11.
Compilation failed in require at /usr/local/lib/perl/5.18.2/Moose.pm line 9.
BEGIN failed--compilation aborted at /usr/local/lib/perl/5.18.2/Moose.pm line 9.
Compilation failed in require at /usr/local/share/perl/5.18.2/Devel/REPL/Script.pm line 6.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.18.2/Devel/REPL/Script.pm line 6.
Compilation failed in require at /usr/local/bin/re.pl line 6.
BEGIN failed--compilation aborted at /usr/local/bin/re.pl line 6.
有谁可以简单地全新安装perl
并获取其所有软件包吗?
答案1
正如我上面的评论所说,5.14 和 5.18 之间存在冲突。
提出的解决方案是重命名~/perl5
为~/perl5_old
,以便cpan
和re.pl
再次工作。
为了回答你的最后一个问题,我将~/perl5
设法使用perlbrew
。