4

dnf update giving me this error, after upgrading my centos7 to centos8

Error: Transaction check error:
  file /usr/lib64/libgdbm_compat.so.4.0.0 from install of gdbm-libs-1:1.18-1.el8.x86_64 conflicts with file from package gdbm-1.10-8.el7.x86_64

I tried dnf install -y libgdbm --best --allowerasing and dnf install -y gdbm --best --allowerasing but dnf update still has this error.

How can I fix this?

UPDATE :

dnf upgrade --best --allowerasing results this :

Error: transaction check vs depsolve:
(gcc >= 8 with gcc < 9) is needed by annobin-8.78-1.el8.x86_64
rpmlib(RichDependencies) <= 4.12.0-1 is needed by annobin-8.78-1.el8.x86_64
(annobin if gcc) is needed by redhat-rpm-config-120-1.el8.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-120-1.el8.noarch
To diagnose the problem, try running: 'rpm -Va --nofiles --nodigest'.
You probably have corrupted RPMDB, running 'rpm --rebuilddb' might fix the issue.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.

https://forums.centos.org/viewtopic.php?f=54&t=73160

4

it seems like gdbm has changed its way of packaging.

The old version gdbm-1.10-8.el7.x86_64 provides the same file as the new gdbm-libs-1:1.18-1.el8.x86_64, so the best you can do probably is erase manually gdbm-1.10-8.el7.x86_64 before retrying the update:

dnf remove gdbm-1.10-8.el7.x86_64

If this does not work because someone needs /usr/lib64/libgdbm_compat.so.4.0.0 then you can use the more complicated swap command:

dnf swap gdbm-1.10-8.el7.x86_64 gdbm-libs-1:1.18-1.el8.x86_64

edit

It seems like we need to convince dnf to change gdbm into gdbm AND gdbm-libs. Try with:

dnf install gdbm gdbm-libs --best --allowerasing

NOTE: I tried the centos7 - centos8 upgrade procedure and ran into multiple problems. I had to remove quite a few packages before this migration would work. That is the trouble when files change from packages, when they are renamed etc. I suspect that now that I got this part working the rest should follow quite fine. Good luck.

| improve this answer | |
  • 1
    dnf remove : Error: Problem: The operation would result in removing the following protected packages: dnf – Exlord Jan 18 at 5:21
  • swap : Error: Problem: package python-libs-2.7.5-86.el7.x86_64 requires libgdbm.so.4()(64bit), but none of the providers can be installed - conflicting requests - problem with installed package python-libs-2.7.5-86.el7.x86_64 – Exlord Jan 18 at 5:21
1

Swap did not work for us on one server. The other when through 7.7 --> 8.0 --> 8.1 without a glitch, aside from some minor packages and GPG-key issues.

If stuck in 8.X and can not upgrade or install anything simply reinstall centos-relase 7 directly from the rpm. http://mirror.centos.org/centos/7/os/x86_64/Packages/centos-release-7-7.1908.0.el7.centos.x86_64.rpm

It will allow you to continue with gdbm-1.

| improve this answer | |
0

I managed to get past this by manually updating gdbm and gdbm-libs using rpm (and ignoring dependencies). Note that I had to download them manually because dnf didn't take them into set of packages to be upgraded. In addition I had to remove python3-pip-9.0.3 and python36-rpmconf, again, with rpm and with ignoring dependencies. Then I started distro-sync.

In essence, what I've did is that I removed offending packages that were reported by dnf, and started dnf again. But be careful that you don't remove something that is critical to rpm and dnf, otherwise, you won't be able to upgrade the system.

| improve this answer | |
New contributor
sgros is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.