this solution worked for me
I don't know if this post is still relevant to the original poster, but in case anyone else has this problem (which I just did!), here's what worked for me:
This problem occured to me using Mandrake Download 10.1.
During certain urpmi operations, you may break perl. Usually this occurs because the urpmi operation tries to update perl in some way, which (because urpmi is actually written in perl) causes major problems. For instance:
Will most likely break perl, with urpmi stopping halfway through the update. This also means the urpm* will no longer work, since it is based on perl.
If you're afflicted with this problem, then when you try to run urpmi (or indeed anything that is based on perl), you'll see errors like:
You will probably also notice that many key components don't work. Urpmi and most "drake" components in Mandrake/Mandriva rely on perl, and will stop working.
Can't locate URPM.pm in @INC (@INC contains: /usr/lib/perl5/5.8.6/i386-linux /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i386-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i386-linux /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/vendor_perl/5.8.5/urpm.pm line 16.
The solution is to revert back to the proper perl. You can't use urpm*, so you'll have to use rpm. Find your installation CD-ROM. Alternately, get the equivalent packages online somewhere. Make sure you find YOUR OLD VERSION of perl; the version that was working previously. To find out what version that is, try going to:
where you can see what versions are installed. Compare this against the urpmi log:
The last urpmi events may indicate something like:
In this case, upgrading from perl 5.8.5 to 5.8.6 was the problem. We want to rever to 5.8.5. Locate the original rpm, probably on your installation CD-ROM (or find it online):
Sat Dec 3 09:07:05 2005 /var/cache/urpmi/rpms/perl-base-5.8.6-6.1.102mdk.i586.rpm /var/cache/urpmi/rpms/perl-5.8.6-6.1.102mdk.i586.rpm
The program 'urpmi' received an X Window System error.
You will need the "nodeps" and "oldpackage" switches because the half-installed version of perl 5.8.6 is interfering. You need to revert to the older version. Perl (and urpmi) should now be working.
rpm -Uhv perl-base-5.8.5-3mdk.i586.rpm --oldpackage --nodeps
rpm -Uhv perl-5.8.5-3mdk.i586.rpm --oldpackage
You could try to symlink the different versions of urpmi. Try:
or the inverse
mv /usr/lib/perl5/5.8.5 /usr/lib/perl5/5.8.5-backup
ln -s /usr/lib/perl5/5.8.6 /usr/lib/perl5/5.8.5
depending on which version of perl is currently being searched by the system. This may work in the short term, but you'll probably want to clean it up later.
mv /usr/lib/perl5/5.8.6 /usr/lib/perl5/5.8.6-backup
ln -s /usr/lib/perl5/5.8.5 /usr/lib/perl5/5.8.6
You may be able to fool urpmi into working temporarily (at least long enough to fix it) by fixing the @INC path. See this suggestion:
The idea is to set and export PERL5LIB and/or the global @INC, adding the required paths. However, the problem is often a binary incompatibility between the various versions of perl, meaning that mixing the files won't work.