Link to home
Start Free TrialLog in
Avatar of shekharbasnet
shekharbasnet

asked on

perl -v shows upgraded version but rpm shows lower version

Hello all

I recently upgraded perl from 5.8.1-92 to 5.8.8. I have been trying to install rrdtool using apt-get but apparently perl version needs to be greater than 5.8.1.

The following packages have unmet dependencies:
  rrdtool: Depends: perl (>= 3:5.8.3) but 3:5.8.1-92 is to be installed
E: Broken packages

When I do perl -v

[root@chulu root]# perl -v

This is perl, v5.8.8 built for i686-linux

Copyright 1987-2006, Larry Wall

And....

[root@chulu root]# rpm -q perl
perl-5.8.1-92

How can I get around this problem?

TIA
Shekhar Basnet


Avatar of Tobias
Tobias
Flag of Switzerland image

Hi !

I think you have installed perl v5.8.8 but you keep the old version.

Try to do this :

apt-get remove --purge perl
apt-get clean
apt-get install perl


Best Regards
Avatar of Rance_Hall
Rance_Hall

if that doesnt work, then you might want to report a bug to the package maintainer, the package database does not record the right version of perl

Try what MadShiva suggested first, then we can go down the road of what to do next
Avatar of shekharbasnet

ASKER

Hi
Thanks for the comments. I did as MadShiva suggested.

pt-get remove --purge perl  ---> success
apt-get clean ---> success
apt-get install perl ---> unsuccessful

I get:

[root@chulu shekhar]# apt-get install perl
Reading Package Lists... Done
Building Dependency Tree... Done
Package perl has no available version, but exists in the database.
This typically means that the package was mentioned in a dependency and
never uploaded, has been obsoleted or is not available with the contents
of sources.list
E: Package perl has no installation candidate

And when I do perl -vI still get v.5.8.8. And all the programs that depend on perl are still running. What will be the next step?

[root@chulu shekhar]# perl -v

This is perl, v5.8.8 built for i686-linux

Copyright 1987-2006, Larry Wall


Hi !

How do you have upgrade perl ?

With apt-get update and apt-get upgrade ?

If you have installed perl with dpkg try : dpkg --remove perl

Best Regards
Hi

This perl 5.8.8 i installed from source. rpm -q does not show perl but perl -v returns the perl version.

[root@chulu shekhar]# rpm -q perl
package perl is not installed

[root@chulu shekhar]# perl -v

This is perl, v5.8.8 built for i686-linux


Hi !

Have you try rpm -e perl and  dpkg --remove perl ?

Could you give me the result of these two command ?

Best Regards
ah ok, now this makes sense.

you installed perl from source.


that means that the version of perl you installed from source is NOT listed in the package database.

so when you went to install a package that needed perl it cant find it because it ONLY looks in the package database.

Only two ways to fix this.

do a "make uninstall" and uninstall the source compiled version of perl

apt-get update

apt-get install perl from the package db

then your other package should install fine.



the other way to handle this is to install the program you are trying to install from source and it can and will find perl the "original" way and you'll be fine.

In general its a bad idea to mix package installs and source installs if you dont know what you are doing.

you could also install the equivs-build package and create a dummy perl package to install that "tells" the package db that perl is installed, then you can continue to use your source compiled perl.
Hi MadShiva
Yes I unistalled perl old version by rpm -e. BUt still the same condition.

Hi Rance Hall,

'make unistall' is not working.

[root@chulu perl-5.8.8]# make unistall
make: *** No rule to make target `unistall'.  Stop.

I was also not able to install equivs-build . How do I do it?

TIA
s
oh, bad spelling above. here's the output.

[root@chulu perl-5.8.8]# make uninstall
make: *** No rule to make target `uninstall'.  Stop.
unfortunately that means that the makers of the perl package have decided that someone would be downright foolish to uninstall perl (in this case they are likely right) so there is no uninstall function in the source code for perl.

this sucks for you.

youve only got two options, that I could recommend having been there myself.

I HOPE this is a test server and you have not screwed up a production box.

if this is a test server, just scrap it and reinstall everything from scratch and call it a learning experience.

if this is a production server I would SERIOUSLY consider doing the same thing, but another option is available.

I have mentioned the equivs-build package in an earlier post.

use the equivs-build package to create a .dpkg file that TELLS THE PACKAGE DB that perl5.8 is in fact installed, but doesnt actually install anything.

you can then use this phony .dpkg file to tell the other package you were trying to install that perl is installed, and it will stop complaining.

equivs-build comes with sample configuration files for other programs like apache etc so that you can see how the process works.

the specific point is to allow you to compile some things from source, but still tell the package database that the program is installed.

However, since perl is really at the core of possibly a thousand things that your server might do, and with all the perl packages that can be installed with apt that likely wont work anymore because of this, I would seriously consider reinstalling the whole box.

I know it sucks, but I still would want to.
Hi Rance Hall,

Yes its not a production box in the strict sense but I have so many monitoring tools and scripts in this box, I am reluctant to reinstall the box. Actually this is how it all started, I wanted to install smokeping which required RRDtool which required a higher version of perl and now I am stuck.

So I will first try the equivs-build package but I was not able to find for my box. I am using Fedora Core 1.  Can you please point me to the right direction? If nothing works then I will have to re-install the box. :-(

TIA
s
ASKER CERTIFIED SOLUTION
Avatar of Rance_Hall
Rance_Hall

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial