CentOS 5.4 perl update problem
Contents |
error description
When updating my CentOS 5.3 to CentOS 5.4, I encountered a problem with updating perl ... If you see a similar error to the following:
yum update perl Loaded plugins: fastestmirror Determining fastest mirrors addons | 951 B 00:00 base | 2.1 kB 00:00 extras | 1.1 kB 00:00 graphviz-stable | 951 B 00:00 updates | 951 B 00:00 Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package perl.x86_64 4:5.8.8-27.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================ Updating: perl x86_64 4:5.8.8-27.el5 base 12 M Transaction Summary ================================================================================================================================================================================ Install 0 Package(s) Update 1 Package(s) Remove 0 Package(s) Total size: 12 M Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Check Error: file /usr/lib/perl5/5.8.8/List/Util.pm from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/lib/perl5/5.8.8/Scalar/Util.pm from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/lib/perl5/5.8.8/pod/perlrun.pod from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/share/man/man1/c2ph.1.gz from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/share/man/man1/cpan.1.gz from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 .... SNIP ... file /usr/share/man/man1/pstruct.1.gz from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/share/man/man1/s2p.1.gz from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/share/man/man1/splain.1.gz from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/share/man/man1/xsubpp.1.gz from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/share/man/man3/List::Util.3pm.gz from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/share/man/man3/Scalar::Util.3pm.gz from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386 file /usr/share/man/man3/Time::HiRes.3pm.gz from install of perl-5.8.8-27.el5.x86_64 conflicts with file from package perl-5.8.8-18.el5_3.1.i386
Solving the problem
You might have the same problems. I am running a 64 Bit system and I found 2 versions of perl installed ... the 64 version and the x86 version. I removed the x86 version and the yum update worked.
option 1: yum update excluding perl
So you can update your system excluding perl - this should be a quite safe option, but anyway you have to fix it at sometime because your perl will not be updated:
yum update --exclude=perl
... so this will update all packages just without perl.
option 2: cleaning up perl conflicts
So to get rid of the problem you have to fix the dependencies. You can check if you have 2 "conflicting" versions of perl installed, like it was on my systems:
rpm -q perl --qf '%{NAME} %{VERSION} %{ARCH}'
If you see 2 packages - something like:
perl 5.8.8 18 x86_64 perl 5.8.8 18 i386
... and you are running a 64 bit system you might want to remove the i386 version. If you are not sure whether the i386 is needed on your system - it is always good to make a backup first ;) On my system it was not really needed. You can use the following command to remove it:
rpm -e perl.i386
After this the "yum update" command should work again without errors. Maybe you could also use "yum erase perl" and reinstall it afterwards, but this will most likely cause a lot of problems on your system since yum will also remove all packages that require perl ... and there might be a lot of them!
Use this advise on your own risk - it worked for me - but it is always good to have a backup ;)