error with yum update - centos

I'm trying to do yum update on my centos 7 server but i'm getting the following error:
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for grub2-tools which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of grub2-tools of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude grub2-tools.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of grub2-tools installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of grub2-tools installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: 1:grub2-tools-2.02-0.64.el7.centos.x86_64 != 1:grub2-tools-2.02-0.44.el7.centos.x86_64
Can someone help me solve this?

I encountered the same problem, due to abnormal stop of yum update process.
I solve by removing grub2-tools and then re-install it, skipping the multilib check.
Specifically here's what I did:
[CAUTION! Use at your own risk ]
yum remove grub2-tools
yum install grub2 --setopt=protected_multilib=false
yum clean all
yum update

I manually download a higher version of grub2-tools (the 2.02-0.64) from
https://www.rpmfind.net/linux/rpm2html/search.php?query=grub2-tools&submit=Search+...&system=&arch=
And then I've manually installed it
rpm -ivh grub2-tools-2.02-0.64.el7.centos.x86_64.rpm
The process failed by dependencies, as it needed grub2-common at least same version (2.02-0.64), so I manually download also, and manually install bot
rpm -ivh grub2-common-2.02-0.64.el7.centos.noarch.rpm
rpm -ivh grub2-tools-2.02-0.64.el7.centos.x86_64.rpm
So the problem seems resolved.

Related

Ubuntu 20.04.5 LTS unable to install postgresql(-client)-13 or above (WSL)

sry but I am not an expert on Linux/Ubuntu, I just use WSL and zsh to fiddle around with it a bit and now for a dev project I need postgre-client-13, 12 seems to be included in Ubuntu focal, but I can not use that, as I need to make DB backups with pg_dump and that gives me a version error then.
I tried literally every SF and Blog Post I could find, but it always came done to versions of this in the end:
sudo apt-get install postgresql-client-15
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
postgresql-client-15 : Depends: libpq5 (>= 15.1) but it is not going to be installed
Depends: libc6 (>= 2.34) but 2.31-0ubuntu9.9 is to be installed
Depends: libssl3 (>= 3.0.0~~alpha1) but it is not installable
E: Unable to correct problems, you have held broken packages.
Currently i deinstalled psql with apt-get purge, but now I have the problem that I can not even install version 12 of it anymore, guess with copying some scripts I broke my global Ubuntu config, now even just calling
sudo apt-get install postgresql-client
leads just to:
The following packages have unmet dependencies:
postgresql-client : Depends: postgresql-client-15 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I tried reading into the problem of held packages, but that is still a bit over my head.
Can someone point me to a good ressource or the right direction to fix my problem? I guess one could be restoring/updating the list of package versions an Ubunut version includes/supports, at least I read something about this?
Thanks very much in advance

centos: error named no module lnamed “_repo” came out in

when I use yum to install a package in centos, the error No module named '_repo' came out, what should I do to fix it?
thank you
well, there is not much info in the question. but still, I will try to provide you some tricks and solution,
first, find which package provides '_repo'
yum whatprovides _repo
install the dependency first (here it is _repo)
yum install _repo
if yum throws an error, use following command to rebuild the yum cache,
yum clean all
yum makecache fast
and then try 1 and 2 points again.

Duplicate Package - update / upgrade - Centos

When I try running yum update on a CentOS 6.3 box, I am getting errors, and says to run yum check. The output of yum check is:
➜ ~ yum check
Loaded plugins: fastestmirror
glibc-2.12-1.107.el6_4.5.x86_64 is a duplicate with glibc-2.12-1.107.el6_4.4.x86_64
glibc-common-2.12-1.107.el6_4.5.x86_64 is a duplicate with glibc-common-2.12-1.107.el6_4.4.x86_64
glibc-devel-2.12-1.107.el6_4.5.x86_64 is a duplicate with glibc-devel-2.12-1.107.el6_4.4.x86_64
glibc-devel-2.12-1.107.el6_4.5.x86_64 has missing requires of glibc-headers = ('0', '2.12', '1.107.el6_4.5')
iputils-20071127-17.el6_4.2.x86_64 is a duplicate with iputils-20071127-17.el6_4.x86_64
nspr-4.9.5-2.el6_4.x86_64 is a duplicate with nspr-4.9.2-1.el6.x86_64
nss-3.14.3-4.el6_4.x86_64 is a duplicate with nss-3.14.0.0-12.el6.x86_64
nss-softokn-3.14.3-3.el6_4.x86_64 is a duplicate with nss-softokn-3.12.9-11.el6.x86_64
nss-util-3.14.3-3.el6_4.x86_64 is a duplicate with nss-util-3.14.0.0-2.el6.x86_64
tzdata-2013g-1.el6.noarch is a duplicate with tzdata-2013c-2.el6.noarch
2:xinetd-2.3.14-39.el6_4.x86_64 is a duplicate with 2:xinetd-2.3.14-38.el6.x86_64
Error: check all
Any idea how to fix these packages? I tried yum reinstall xinetd tzdata nss-util nss-softokn nss nspr iputils glibc glibc-common glibc-devel but got:
Error: Multilib version problems found. This often means that the
root
cause is something else and multilib version checking is just
pointing out that there is a problem.
For me it looks like you rebooted your computer (or it crashed) while you where in the process of upgrading packages. So new packages where installed, but old packages where not removed.
First look if you have any uncomplete transactions with: yum-complete-transaction
If this doesn't help then take a look at the package-cleanup tool which is part of the yum-utils package.
package-cleanup --dupes lists duplicate packages
package-cleanup --cleandupes removes duplicate packages
But be carefull with the command and create a backup before removing duplicates.
This is the way I did fix one CentOS 7 server with 471 dupes.
First I had to install yum utils:
yum install yum-utils
Have tried yum-complete-transaction and other stuff without luck, I gave up the transaction with:
yum-complete-transaction --cleanup-only
Then I got a sorted list of duplicated packages so I could identify older versions to remove filtering even and odd lines later:
package-cleanup --dupes | sort -u > dupes.out
Then I got a uninstall list from this sorted file this way:
cat dupes.out | grep -v 'Loaded plugins:' | sort -u | awk 'NR % 2 == 1' > uninstall.in
Then I removed from rpm database the old versions:
for f in `cat uninstall.in`; do rpm -e --nodeps -f --justdb $f; done
Finally I could continue on regular system upgrade:
yum upgrade
Some things to pay attention:
On this case, I have carefully reviewed the "package-cleanup --dupes" output to make sure how to generate the uninstall list.
I have tried a "reinstall the newer" approach inverting the list (awk 'NR % 2 == 0') but there where lots of packages not available anymore at that version (server was left this way for an year).
I thought about removing from rpmdb the newer packages, so upgrade later should reinstall everything, but after checking on filesystem installed files, it was clear for me that new versions were in place, with only older rpm entries still in rpmdb. Maybe your case is different.
I was able to remove all duplicates by using yum shell:
I first ordered it to remove all packages using remove foo-package-*
Then order it to install previous version by specifying the exact version install foo-package-3.14.1-5.i386 foo-package-3.14.1-5.x86_64
Committing the transaction by run
After that, the duplicates were gone and I could update the system to current packages without problem and without introducing any new duplicates.
This works even for system packages like nss or yum.
Try running:
yum reinstall [package-new.version]
It is mean, if you get the output of yum check is:
# yum check
Loaded plugins: fastestmirror
nss-3.14.3-4.el6_4.x86_64 is a duplicate with nss-3.14.0.0-12.el6.x86_64
Do reinstall:
yum reinstall nss-3.14.3-4.el6_4.x86_64
A minor upgrade was interrupted by SSH disconnection. After handholding a few packages while trying to get other fixes to work, I ended up fixing the rest like so:
sudo yum reinstall --skip-broken $(/usr/bin/package-cleanup --dupes -q |sort)
First install yum utils and run cleanup afterwards to remove old duplicated packages
yum install yum-utils &&
package-cleanup –-cleandupes -y
hint:
sometimes you need to run package-cleanup –-cleandupes few times
A couple of months ago I also ran into this problem after upgrading my fedora.
I also tried the package-cleanup utility and it started removing required libs rendering my workstation unworkable. Luckily I could reinstall Fedora not deleting my home partition.
Yesterday the same problem occured and I fixed it removing the older version of the duplicate.
For example:
I got these duplicates:
oxygen-icon-theme-4.8.3-1.fc16.noarch is a duplicate with oxygen-icon-theme-4.8.2-1.fc16.noarch
sane-backends-libs-1.0.22-10.fc16.i686 is a duplicate with sane-backends-libs-1.0.22-8.fc16.i686
What I did is I used the yum remove sane-backends-libs-1.0.22-8.fc16.i686 and afterwards a yum update.
Everything is now working fine.
from http://forums.fedoraforum.org/showthread.php?t=268328
In my case nothing above has worked.
So after having the Duplicates list, I copied it to a Text Editor ...
And i did
yum upgrade {package name}
As I edited the whole list, I did it continuously ...
Example: yum upgrade sudo nano came mariadb, etc ...
what worked for me is :
1) getting the list of duplicated packages : package-cleanup --dupes
2) deleting manually old duplicates : rpm -e --justdb --nodeps {old-version-duplicated-package}
3) yum update

Yum won't update because of newer libstdc++ library. How do I fix this?

Whenever I try to update my system via "sudo yum update", I get this error:
Transaction Check Error:
package libstdc++-4.3.2-7.i386 (which is newer than libstdc++-4.1.2-51.el5.x86_64) is already installed
I'm not sure how I got in this state, but I'm pretty sure that whatever I've done has been through yum.
Here's what "yum list" gives me for that library:
libstdc++.x86_64 4.1.2-50.el5 installed
libstdc++.i386 4.3.2-7 installed
libstdc++-devel.x86_64 4.1.2-50.el5 installed
Notice how the i386 version is different than the .x86_64 version. That's really strange.
I'm running CentOS 5.6 64 bit.
What should I do?
You can use the lazy man's method. For now use --skip-broken so other stuff will update. And eventually your repo version of libstdc++ will catchup to what's on your box.

Installing php-devel-5.1.6-27.el5_5.3.x86_64

I'm working on a 64 bit centos 5.5 (Final) server
When I try to install pear it gives a dependency error
php-devel-5.1.6-27.el5_5.3.x86_64 from base has depsolving problems
--> Missing Dependency: php = 5.1.6-27.el5_5.3 is needed by package php-devel-5.1.6-27.el5_5.3.x86_64 (base)
So I try "yum install php-common-5.1.6-27.el5_5.3" it says that this package is already installed
Package matching php-common-5.1.6-27.el5_5.3.x86_64 already installed. Checking for update.
Nothing to do
I don't know what to do anymore
Can anyone give me a tip?
It's driving me crazy
when I try yum remove php-common-5.1.6-27.el5_5.3.x86_64 it gives me the following
Package(s) php-common-5.1.6-27.el5_5.3.x86_64 available, but not installed.
I don't understand what's wrong with yum
Try removing PHP and Pear, then try this from scratch as if your OS was new. It may help. Pear's a pain sometimes...
# yum install php
# yum install php-pear
# pear channel-update pear.php.net
# pear upgrade-all
Good luck!!
to refresh your system, you might try
yum reinstall php-common; yum install php-devel