Dependency error lvm2 conflicts with lvm2-cluster on routine update

General support questions including new installations
abednegoyulo
Posts: 550
Joined: 2007/12/26 06:24:38
Location: 127.0.0.2 44013

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by abednegoyulo » 2008/11/18 01:38:32

Just my 2 cents worth:

Nobody can exploit/hack something that is not installed :-D

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by toracat » 2008/11/18 02:54:59

[quote]
richard_chapman wrote:
The question of how I ended up with several old versions of the LVM2 packages remains unanswered. I wonder what other packages I might have multiple version of....[/quote]
This is indeed a good question that needs to be answered. Check to see if you have duplicates by running the command ([b]one line[/b]):

for file in `rpm -qa --queryformat="%{NAME} %{ARCH}\n" | sort | uniq -c | grep -v " 1 " | cut -c 9- | cut -d" " -f1`; do rpm -q --last $file | head -1 | cut -d" " -f1; done

For more details, please see this thread:

http://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=15574&forum=27

richard_chapman
Posts: 252
Joined: 2006/09/08 02:54:11

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by richard_chapman » 2008/11/18 03:57:50

A short response to Alan's very wise words:
Don't look in my fridge. It is worse than my computer....:-).

But you point is taken. I guess I don't fully understand how the lvm2-cluster package relates to and depends on the other cluster functions and components - and whether I might end up with a 1/2 working cluster at some point in the future. I work on the principle "if I don't understand what I'm doing - maybe I shouldn't be doing it".


And thanks to toracat...
I ran the command:
rpm -qa --queryformat="%{NAME} %{ARCH}\n" | sort | uniq -c | grep -v " 1 "
And I must have several hundred packages with 2 or more versions.
I also ran the command you (toracat) suggested above - but didn't really understand it. Not sure what the output meant. It reported hundreds of packages though.

I had a look at the other thread and it looks like I am not alone. I find it hard to believe all these extra packages could be caused by crashes in the middle of updates. If it has ever crashed during an update - it would have been once or twice at most. I have to believe there must be another explanation.

Apart from "filling up the fridge" what problems wll these extra packages cause. I guess my lvm2 problem is an obvious example. Are there any other issues I need to be aware of?

I don't really understand how the rpm database relates to reality - and how the databse and reality get synchronised after a "--justdb" operation. If there are more package "present" than those in the database (after a "--justdb" clean-up for example) - what actually runs on the system? Does it run teh database versions or the latest version "present"? How do you get rid of the remaining stuff which is present - but not in the database?

Thanks to all for all the expert advice.

Richard.

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by toracat » 2008/11/18 05:03:21

[quote]
richard_chapman wrote:

I don't really understand how the rpm database relates to reality - and how the databse and reality get synchronised after a "--justdb" operation. If there are more package "present" than those in the database (after a "--justdb" clean-up for example) - what actually runs on the system? Does it run teh database versions or the latest version "present"? How do you get rid of the remaining stuff which is present - but not in the database?
[/quote]
I now want you to read through this thread:

http://www.centos.org/modules/newbb/viewtopic.php?topic_id=10139&forum=27&post_id=32527

You will find that the original poster has hundreds of duplicates. Yes, interrupting yum could cause this mess. That thread might give you some good explanations and certainly provides a remedy. In short, you would run the following command to get rid of redundant entries (one line):

for file in `rpm -qa --queryformat="%{NAME} %{ARCH}\n" | sort | uniq -c | grep -v " 1 " | cut -c 9- | cut -d" " -f1`; do rpm -q --last $file | head -1 | cut -d" " -f1; done | grep -v kernel | grep -v gpg-pubkey | xargs rpm -e --justdb --nodeps

Then run:

yum update

richard_chapman
Posts: 252
Joined: 2006/09/08 02:54:11

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by richard_chapman » 2008/11/18 12:08:12

Hi Akemi.. I hope I have that right...

Thanks so much fro your help.

I have taken (most) of your advice... but being a cautious sort - and following Alan's example - I put the --test switch into the rpm command... and I did get errors - thus:

[root@C5 ~]# for file in `rpm -qa --queryformat="%{NAME} %{ARCH}\n" | sort | uniq -c | grep -v " 1 " | cut -c 9- | cut -d" " -f1`; do rpm -q --last $file | head -1 | cut -d" " -f1; done | grep -v kernel | grep -v gpg-pubkey | xargs rpm -e --test --justdb --nodeps
error: "alsa-lib-1.0.14-1.rc4.el5" specifies multiple packages
error: "alsa-lib-1.0.14-1.rc4.el5" specifies multiple packages
error: "apr-util-1.2.7-7.el5" specifies multiple packages
error: "apr-util-1.2.7-7.el5" specifies multiple packages
error: "at-spi-devel-1.7.11-3.el5" specifies multiple packages
error: "at-spi-devel-1.7.11-3.el5" specifies multiple packages
error: "at-spi-1.7.11-3.el5" specifies multiple packages
error: "at-spi-1.7.11-3.el5" specifies multiple packages
error: "audit-libs-1.6.5-9.el5" specifies multiple packages
error: "audit-libs-1.6.5-9.el5" specifies multiple packages
error: "cairo-1.2.4-5.el5" specifies multiple packages
error: "cairo-1.2.4-5.el5" specifies multiple packages
error: "control-center-2.16.0-16.el5" specifies multiple packages
error: "control-center-2.16.0-16.el5" specifies multiple packages
error: "coolkey-devel-1.1.0-6.el5" specifies multiple packages
error: "coolkey-devel-1.1.0-6.el5" specifies multiple packages
error: "coolkey-1.1.0-6.el5" specifies multiple packages
error: "coolkey-1.1.0-6.el5" specifies multiple packages
error: "cracklib-2.8.9-3.3" specifies multiple packages
error: "cracklib-2.8.9-3.3" specifies multiple packages
error: "dbus-devel-1.0.0-7.el5" specifies multiple packages
error: "dbus-devel-1.0.0-7.el5" specifies multiple packages
error: "dbus-1.0.0-7.el5" specifies multiple packages
error: "dbus-1.0.0-7.el5" specifies multiple packages
error: "device-mapper-1.02.24-1.el5" specifies multiple packages
error: "device-mapper-1.02.24-1.el5" specifies multiple packages
error: "e2fsprogs-libs-1.39-15.el5" specifies multiple packages
error: "e2fsprogs-libs-1.39-15.el5" specifies multiple packages
error: "evolution-data-server-devel-1.12.3-6.el5" specifies multiple packages
error: "evolution-data-server-devel-1.12.3-6.el5" specifies multiple packages
error: "evolution-data-server-1.12.3-6.el5" specifies multiple packages
error: "evolution-data-server-1.12.3-6.el5" specifies multiple packages
error: "evolution-2.12.3-8.el5_2.2" specifies multiple packages
error: "evolution-2.12.3-8.el5_2.2" specifies multiple packages
error: "freetype-devel-2.2.1-20.el5_2" specifies multiple packages
error: "freetype-devel-2.2.1-20.el5_2" specifies multiple packages
error: "freetype-2.2.1-20.el5_2" specifies multiple packages
error: "freetype-2.2.1-20.el5_2" specifies multiple packages
error: "ghostscript-8.15.2-9.3.el5" specifies multiple packages
error: "ghostscript-8.15.2-9.3.el5" specifies multiple packages
error: "glibc-devel-2.5-24" specifies multiple packages
error: "glibc-devel-2.5-24" specifies multiple packages
error: "glibc-2.5-24" specifies multiple packages
error: "glibc-2.5-24" specifies multiple packages
error: "gnome-panel-devel-2.16.1-7.el5" specifies multiple packages
error: "gnome-panel-devel-2.16.1-7.el5" specifies multiple packages
error: "gnome-panel-2.16.1-7.el5" specifies multiple packages
error: "gnome-panel-2.16.1-7.el5" specifies multiple packages
error: "gnome-utils-2.16.0-5.el5" specifies multiple packages
error: "gnome-utils-2.16.0-5.el5" specifies multiple packages
error: "gnutls-1.4.1-3.el5_2.1" specifies multiple packages
error: "gtk2-devel-2.10.4-20.el5" specifies multiple packages
error: "gtk2-devel-2.10.4-20.el5" specifies multiple packages
error: "gtk2-2.10.4-20.el5" specifies multiple packages
error: "gtk2-2.10.4-20.el5" specifies multiple packages
error: "gtkhtml3-3.16.3-1.el5" specifies multiple packages
error: "gtkhtml3-3.16.3-1.el5" specifies multiple packages
error: "hal-0.5.8.1-35.el5" specifies multiple packages
error: "hal-0.5.8.1-35.el5" specifies multiple packages
error: "java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115" specifies multiple packages
error: "java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115" specifies multiple packages
error: "kdebase-3.5.4-18.el5.centos" specifies multiple packages
error: "kdebase-3.5.4-18.el5.centos" specifies multiple packages
error: "kdelibs-devel-3.5.4-16.el5.centos" specifies multiple packages
error: "kdelibs-devel-3.5.4-16.el5.centos" specifies multiple packages
error: "kdelibs-3.5.4-16.el5.centos" specifies multiple packages
error: "kdelibs-3.5.4-16.el5.centos" specifies multiple packages
error: "kudzu-devel-1.2.57.1.17-1" specifies multiple packages
error: "kudzu-devel-1.2.57.1.17-1" specifies multiple packages
error: "libacl-devel-2.2.39-3.el5" specifies multiple packages
error: "libacl-devel-2.2.39-3.el5" specifies multiple packages
error: "libacl-2.2.39-3.el5" specifies multiple packages
error: "libacl-2.2.39-3.el5" specifies multiple packages
error: "libgnomeprint22-2.12.1-10.el5" specifies multiple packages
error: "libgnomeprint22-2.12.1-10.el5" specifies multiple packages
error: "libpurple-2.3.1-2.el5_2" specifies multiple packages
error: "libpurple-2.3.1-2.el5_2" specifies multiple packages
error: "libraw1394-1.3.0-1.el5" specifies multiple packages
error: "libraw1394-1.3.0-1.el5" specifies multiple packages
error: "libselinux-devel-1.33.4-5.el5" specifies multiple packages
error: "libselinux-devel-1.33.4-5.el5" specifies multiple packages
error: "libselinux-1.33.4-5.el5" specifies multiple packages
error: "libselinux-1.33.4-5.el5" specifies multiple packages
error: "libuser-devel-0.54.7-2.el5.5" specifies multiple packages
error: "libuser-devel-0.54.7-2.el5.5" specifies multiple packages
error: "libuser-0.54.7-2.el5.5" specifies multiple packages
error: "libuser-0.54.7-2.el5.5" specifies multiple packages
error: "libvirt-0.3.3-7.el5" specifies multiple packages
error: "libvirt-0.3.3-7.el5" specifies multiple packages
error: "libvolume_id-095-14.16.el5" specifies multiple packages
error: "libvolume_id-095-14.16.el5" specifies multiple packages
error: "libX11-devel-1.0.3-9.el5" specifies multiple packages
error: "libX11-devel-1.0.3-9.el5" specifies multiple packages
error: "libX11-1.0.3-9.el5" specifies multiple packages
error: "libX11-1.0.3-9.el5" specifies multiple packages
error: "mesa-libGL-devel-6.5.1-7.5.el5" specifies multiple packages
error: "mesa-libGL-devel-6.5.1-7.5.el5" specifies multiple packages
error: "mesa-libGL-6.5.1-7.5.el5" specifies multiple packages
error: "mesa-libGLU-6.5.1-7.5.el5" specifies multiple packages
error: "mesa-libGLU-6.5.1-7.5.el5" specifies multiple packages
error: "mesa-libGL-6.5.1-7.5.el5" specifies multiple packages
error: "metacity-2.16.0-10.el5" specifies multiple packages
error: "metacity-2.16.0-10.el5" specifies multiple packages
error: "mkinitrd-5.1.19.6-28" specifies multiple packages
error: "mkinitrd-5.1.19.6-28" specifies multiple packages
error: "mysql-devel-5.0.45-7.el5" specifies multiple packages
error: "mysql-devel-5.0.45-7.el5" specifies multiple packages
error: "mysql-5.0.45-7.el5" specifies multiple packages
error: "mysql-5.0.45-7.el5" specifies multiple packages
error: "nautilus-extensions-2.16.2-7.el5" specifies multiple packages
error: "nautilus-extensions-2.16.2-7.el5" specifies multiple packages
error: "NetworkManager-glib-0.6.4-8.el5" specifies multiple packages
error: "NetworkManager-glib-0.6.4-8.el5" specifies multiple packages
error: "newt-devel-0.52.2-10.el5" specifies multiple packages
error: "newt-devel-0.52.2-10.el5" specifies multiple packages
error: "newt-0.52.2-10.el5" specifies multiple packages
error: "newt-0.52.2-10.el5" specifies multiple packages
error: "nspr-4.7.1-1.el5" specifies multiple packages
error: "nspr-4.7.1-1.el5" specifies multiple packages
error: "nss_db-2.2-35.3" specifies multiple packages
error: "nss_db-2.2-35.3" specifies multiple packages
error: "nss-3.12.1.1-3.el5.centos" specifies multiple packages
error: "openldap-devel-2.3.27-8.el5_2.4" specifies multiple packages
error: "openldap-devel-2.3.27-8.el5_2.4" specifies multiple packages
error: "openldap-2.3.27-8.el5_2.4" specifies multiple packages
error: "openldap-2.3.27-8.el5_2.4" specifies multiple packages
error: "openssl-devel-0.9.8b-10.el5" specifies multiple packages
error: "openssl-devel-0.9.8b-10.el5" specifies multiple packages
error: "openssl-0.9.8b-10.el5" specifies multiple packages
error: "openssl-0.9.8b-10.el5" specifies multiple packages
error: "pam-devel-0.99.6.2-3.27.el5" specifies multiple packages
error: "pam-devel-0.99.6.2-3.27.el5" specifies multiple packages
error: "pam-0.99.6.2-3.27.el5" specifies multiple packages
error: "pam-0.99.6.2-3.27.el5" specifies multiple packages
error: "parted-1.8.1-17.el5" specifies multiple packages
error: "parted-1.8.1-17.el5" specifies multiple packages
error: "pciutils-devel-2.2.3-5" specifies multiple packages
error: "pciutils-devel-2.2.3-5" specifies multiple packages
error: "pcre-6.6-2.el5_1.7" specifies multiple packages
error: "pcre-6.6-2.el5_1.7" specifies multiple packages
error: "pcsc-lite-devel-1.4.4-0.1.el5" specifies multiple packages
error: "pcsc-lite-devel-1.4.4-0.1.el5" specifies multiple packages
error: "pcsc-lite-libs-1.4.4-0.1.el5" specifies multiple packages
error: "pcsc-lite-libs-1.4.4-0.1.el5" specifies multiple packages
error: "pidgin-2.3.1-2.el5_2" specifies multiple packages
error: "pidgin-2.3.1-2.el5_2" specifies multiple packages
error: "popt-1.10.2-48.el5" specifies multiple packages
error: "popt-1.10.2-48.el5" specifies multiple packages
error: "pygtk2-devel-2.10.1-12.el5" specifies multiple packages
error: "pygtk2-devel-2.10.1-12.el5" specifies multiple packages
error: "python-devel-2.4.3-21.el5" specifies multiple packages
error: "python-devel-2.4.3-21.el5" specifies multiple packages
error: "redhat-lsb-3.1-12.3.EL.el5.centos" specifies multiple packages
error: "redhat-lsb-3.1-12.3.EL.el5.centos" specifies multiple packages
error: "rpm-devel-4.4.2-48.el5" specifies multiple packages
error: "rpm-libs-4.4.2-48.el5" specifies multiple packages
error: "rpm-libs-4.4.2-48.el5" specifies multiple packages
error: "samba-common-3.0.28-1.el5_2.1" specifies multiple packages
error: "samba-common-3.0.28-1.el5_2.1" specifies multiple packages
error: "tcp_wrappers-7.6-40.4.el5" specifies multiple packages
error: "tcp_wrappers-7.6-40.4.el5" specifies multiple packages
error: "totem-2.16.7-4.el5" specifies multiple packages
error: "totem-2.16.7-4.el5" specifies multiple packages
[root@C5 ~]#

I suspect that these packages are those which are installed with both i386 and x86_64 architectures - and they error because the package list generated does not distinguish the two architectures - so they appear twice. There are far fewer errors than the packages with multiple versions. I also generated that list - but haven't put it here - because it is pretty long.

Any ideas how to dal with these errors before I run teh comand for real?

Richard.

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by toracat » 2008/11/18 13:37:53

Your analysis is totally correct. I did not realize you had a mixed arch system. In this case, you might want to save the output into a file instead of piping it to the xargs command. That file should contain a list of unique rpm names. Then run a script that would append the arch (i386 or x86_64) and feed it to the rpm -e command. I will leave this to [b]Alan[/b] because he [i]loves[/i] writing scripts. He would even come up with a better method. :-D

[OT]
Looking through the list of i386 packages you have on the system, I figure you do not really need any of those ?? Is this the case or are you running some 32-bit applications? If you have no need for 32-bit applications, I would suggest you entirely remove all i386 bits. Please note that glibc is i686 which can be removed as well. Running a clean, pure 64-bit system is much more desirable.
[/OT]

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by AlanBartlett » 2008/11/18 14:20:27

[quote]I will leave this to Alan because he loves writing scripts.[/quote]
I refute this inappropriate feline utterance of the facts. :-P Just because I suggested, yesterday, that the fish should have been put down (http://www.centos.org/modules/newbb/viewtopic.php?topic_id=17321&forum=37&post_id=62320#forumpost62320) . . .

[quote]He would even come up with a better method.[/quote]
Never were truer words spoken. Cough. Could [b]toracat[/b] be angling for something, perhaps? (Apart from another fish . . . ) :lol:

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by toracat » 2008/11/18 15:16:50

[quote]
AlanJBartlett wrote:
Could [b]toracat[/b] be angling for something, perhaps? (Apart from another fish . . . ) :lol:[/quote]
Another day, another fish :-o
The OP is back to the original caretaker's hand :-D

richard_chapman
Posts: 252
Joined: 2006/09/08 02:54:11

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by richard_chapman » 2008/11/19 03:37:53

Thanks Alan and Toracat...

I'm not really sure why I have so much i386 stuff on here. I remember a couple of things:
1) I installed a 32 bit firefox - because there was no flash-player plug in for the 64 but version - but I think I have since fixed that with a "wrapper".
2) I vaguely remember something about 32 bit perl - but I can't really remember what it was all about. Maybe some perl package needed it.
3) I had a segmentation faults with one of the squid analysis tools 64 bit (SARG: 2.2.3.1-1.el5) so I installed a 32 bit version to work around the problem.

It is hard to see how any of these would cause so much i386 stuff to get loaded.

Can either of you advise on what implications there might be in removing it all - and whether there is anything i386 I need to keep. Also - how to remove it...

Presumably if I do that first - then the earlier methods should work to remove my multiple version.

Alternatively - if Alan's scripting skills need some exercise....:-)

Thanks again

Richard.

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Dependency error lvm2 conflicts with lvm2-cluster on routine update

Post by toracat » 2008/11/19 04:53:50

Installing firefox.i386 alone would install well over 60 i386 packages. In addition, the current version of yum has some "issue" and, in certain occasions, it installs i386 rpm's when that is not required at all. At the moment, the best way to keep a 64-bit system free of 32-bit rpms is to add [b]exclude=*.i386 *.i686[/b] to [i]/etc/yum.conf[/i].

If you are sure that you do not need to maintain 32-bit applications, you can remove all i386 packages by running [b]yum remove \*.i386[/b]. It will prompt you with a "Is this ok [y/N]: ". You can look through the list of packages to be deleted before hitting the "Y" key.

[quote]
richard_chapman wrote:

Alternatively - if Alan's scripting skills need some exercise....:-)
[/quote]
Oh, no, [b]Alan[/b] is the last person who needs exercise when it comes to scripting. It will come soon ...

Post Reply