Lost dnf after migration from Centos7/8 to AlmaLinux

399 views Asked by At

I migrated my CentOS 7 to 8 and then to AlmaLinux, but in the process i lost dnf and yum. Now i try to fix, but have a lot of problems with dependencies etc. Only rpm is working so i have to do all “manually”.

If i try:

rpm -ivh https://vault.centos.org/centos/8/BaseOS/x86_64/os/Packages/rpm-libs-4.14.3-19.el8.x86_64.rpm

i get an error:

Failed dependencies: rpm = 4.14.3-19.el8 is needed by rpm-libs-4.14.3-19.el8.x86_64

but if try:

rpm -ivh https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/Packages/rpm-4.14.3-19.el8_5.2.x86_64.rpm

i get a lot of conflicts:


    warning: /var/tmp/rpm-tmp.GOCy2Q: Header V4 RSA/SHA256 Signature, key ID c21ad6ea: NOKEY
    Retrieving https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/Packages/rpm-4.14.3-19.el8_5.2.x86_64.rpm
    Preparing...                          ########################################
        file /usr/bin/rpm from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/bin/rpm2cpio from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/bin/rpmdb from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/bin/rpmkeys from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/bin/rpmquery from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/bin/rpmverify from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/aarch64-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/alpha-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/alphaev5-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/alphaev56-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/alphaev6-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/alphaev67-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/alphapca56-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/amd64-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/armv3l-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/armv4b-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/armv4l-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/armv5tejl-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/armv5tel-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/armv6l-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/armv7hl-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/armv7hnl-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/armv7l-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/athlon-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/geode-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/i386-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/i486-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/i586-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/i686-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ia32e-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ia64-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/m68k-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/noarch-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/pentium3-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/pentium4-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppc-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppc32dy4-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppc64-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppc64iseries-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppc64le-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppc64p7-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppc64pseries-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppc8260-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppc8560-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppciseries-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/ppcpseries-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/s390-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/s390x-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sh-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sh3-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sh4-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sh4a-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sparc-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sparc64-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sparc64v-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sparcv8-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sparcv9-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/sparcv9v-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/platform/x86_64-linux/macros from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/rpm2cpio.sh from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/lib/rpm/rpmrc from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/br/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/ca/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/cs/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/da/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/de/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/el/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/eo/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/es/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/fi/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/fr/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/is/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/it/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/ja/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/ko/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/ms/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/nb/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/nl/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/pl/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/pt/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/pt_BR/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/ru/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/sk/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/sl/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/sr/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/sr@latin/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/sv/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/te/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/tr/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/uk/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/zh_CN/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/locale/zh_TW/LC_MESSAGES/rpm.mo from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/man/man8/rpm.8.gz from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64
        file /usr/share/man/man8/rpm2cpio.8.gz from install of rpm-4.14.3-19.el8_5.2.x86_64 conflicts with file from package rpm-4.11.3-48.el7_9.x86_64

How can i fix it? I have only an remote access (via ssh or webmin) to this system. I have an Centos 7 and AlmaLinux on VirtualBox, so i can possibly transfer some files from there.

1

There are 1 answers

0
msuchy On

You still have packages from EL7. This means you failed to upgrade from CentOS 7 to CentOS 8. This is not officially supported. But it is technically possible - https://www.tecmint.com/upgrade-centos-7-to-centos-8/

At this stage of your brokenness, it will be much much easier to wipe the OS and install Alma from scratch.