LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   yum update problem (https://www.linuxquestions.org/questions/linux-server-73/yum-update-problem-4175605825/)

zafar_dandoti 05-13-2017 04:06 AM

yum update problem
 
1 Attachment(s)
hello everyone
i was updating centos server then i got this error of dulicate packages( pls see the attached jpg)
i tried to cleanup duplicates as suggested online posts.
package-cleanup --cleandupes does not remove duplicates.

this problem occurred when server was rebooted due to power failure while server was updating.
now im not able to update my system. centos 7 64 bit

Didier Spaier 05-13-2017 06:52 AM

I never used Centos nor Yum, but an Internet search for yum rebuild corrupted database leads to these web pages:
http://centoshowtos.org/package-mana...-yum-database/
https://ma.ttias.be/rebuilding-yum-rpm-database/

That's all I know.

pantdk 05-30-2017 06:14 AM

check the conflict packages & remove it

like
Avahi have install package is 0.6.31-17.el7
but your are trying to install AVahi having 0.6.31-15

remove the 0.6.31-17.el7 and install the current one which you want to install

vincix 05-31-2017 03:36 AM

I'm not sure removing conflicting packages individually is a good idea. It probably makes no difference when it comes to 'avahi' for instance, but there could be important software installed on your operating system that depends on those packages and yum will uninstall that too if you remove the dependencies. So I'd also suggest rebuilding the yum clean all, update.

pantdk 05-31-2017 03:50 AM

Actually i have face same issue and i have resolve it in this manner, so as per the shared screen shot these packages are conflicting.

regarding the rebuilding of yum that even not resolve my issue. so i think if nothing is work then he can try this option

vincix 05-31-2017 03:53 AM

I'm not saying that it can't be done that way, I'm just saying that it's risky if other programs are dependent on those packages. So you kind of have to know what you're doing, otherwise you might end up deleting more than you actually intended. It's barely a universal solution for this situation. Fixing it through rpm and yum is a much cleaner solution.

zafar_dandoti 06-05-2017 03:05 AM

i read few posts online that suggest to remove individual packages from database.
Code:

# rpm -e --justdb PakageName
there are more than 300 packages conflicting and which are dependent or have dependencies which requires the package on the system.
i yet in search to get it work.

chrism01 06-06-2017 11:11 PM

The screen shot shows 'found 333 existing rpmdb problems'.
I really think you'll have rebuild the rpmdb to even stand a chance.
See the links in post #2

zafar_dandoti 06-20-2017 02:39 AM

Quote:

Originally Posted by chrism01 (Post 5719926)
The screen shot shows 'found 333 existing rpmdb problems'.
I really think you'll have rebuild the rpmdb to even stand a chance.
See the links in post #2

Thanx chris,
i tried those links but that does not worked.Rebuild database as suggested and ran "yum clean all" "yum update"
still i got those conflicting packages.I ran those commands with sudo user as well as root.

lazydog 06-20-2017 01:00 PM

Do you have more than one repo installed? I've seen this when there was more than one repo installed. The fix was to turn off the repo that was causing the conflicts.

sgrlscz 06-22-2017 11:24 AM

For aborted updates, yum-complete-transaction can often resolve it. It's provided in the yum-utils package. When you run the command, it will tell you what it's going to do and ask for confirmation, so you can abort if you're worried.

You can find out information about the aborted transaction in /var/lib/yum. The transaction-all-<timestamp> file has the list of what was going to be done, and transaction-done-<timestamp> has what was actually completed, so the difference between the two is what is left to be completed.

One note, I've found that if the kernel was upgraded as part of the aborted yum update, the yum-complete-transaction doesn't seem to handle that correctly, and you either end up with missing modules or a corrupt initramfs or both. Because of that, I usually reinstall the kernel after the yum-complete-transaction just to be safe.

zafar_dandoti 07-06-2017 01:31 AM

Quote:

Originally Posted by sgrlscz (Post 5725745)
For aborted updates, yum-complete-transaction can often resolve it. It's provided in the yum-utils package. When you run the command, it will tell you what it's going to do and ask for confirmation, so you can abort if you're worried.

You can find out information about the aborted transaction in /var/lib/yum. The transaction-all-<timestamp> file has the list of what was going to be done, and transaction-done-<timestamp> has what was actually completed, so the difference between the two is what is left to be completed.

One note, I've found that if the kernel was upgraded as part of the aborted yum update, the yum-complete-transaction doesn't seem to handle that correctly, and you either end up with missing modules or a corrupt initramfs or both. Because of that, I usually reinstall the kernel after the yum-complete-transaction just to be safe.

no incomplete transactions left..! thats what i get

its worrying me...

zafar_dandoti 07-11-2017 03:36 AM

so, excluding avahi from update worked for me.

Code:

# yum -x avahi* update
but i had to do it every time whenever update .
if only network manager uses it for auto connection of network will it be safe to disable/remove it?

zafar_dandoti 07-17-2017 12:27 AM

After updating to new kernel , i once again ran # package-cleanup --cleandupes and # package-cleanup --orphans. And then rebuild database then everything is now working as before.


All times are GMT -5. The time now is 04:09 PM.