在我的centos 6.3服务器上,我通过yum install perl
打包程序安装
但是,通过ExtUtils/Embed
cpan安装cpan
时,将我的Perl更新为v5.17.4,它应该是5.10.1-127(可能是因为我使用了强制安装方法,因此通过依赖关系进行了某种方式)。
所以现在我遇到了很多问题,比如错误:
../x86_64-linux/CORE/libperl.a(op.o): relocation R_X86_64_32S against `PL_sv_yes' can not be used when making a shared object; recompile with -fPIC
我无法用fpic重新编译,因为它是通过cpan以某种方式安装的。编译器正在使用这个新的perl而不是旧的兼容的perl,它不会给我这个错误。
有没有办法可以卸载这个5.17.4 perl?我试图使用pm-uninstall
等等无济于事。我甚至试过yum reinstall perl
但是新的perl仍在使用中
答案 0 :(得分:3)
这不会擦洗所有东西,但应该让你再次去。
记录您安装的perl rpms:
rpm -qa | grep ^perl > /tmp/perlpkgs
强行删除它们:
for i in `cat /tmp/perlpkgs` ; do rpm -ev --nodeps $i ; done
在cpan将其置于/usr/local
which perl
如果打印/usr/local/bin/perl
,则P=/usr/local
;否则P=/usr
删除任何perl二进制文件等,
rm -fr $P/bin/perl* $P/lib*/perl* $P/share/man/man?/perl*
rm -fr $P/share/man/man?/*.3pm* $P/share/perl*
重新安装所有原始包:
yum install `cat /tmp/perlpkgs`