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(the space in the urls was added intentionally)
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 https://pastebin.com/LexNqzY5
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.
There has never been a supported migration from CentOS Linux 7 into CentOS Linux 8.
However, AlmaLinux has released ELevate AlmaLinux OS - ELevate Your Distribution
The ELevate can convert some systems directly from CentOS Linux 7 into AlmaLinux 8 …
I can’t tell whether it could have worked on your system.
@jlehtone Unfortunately it will not help, because yum is not working - it needs dnf… i had AlmaLinux aready(Webmin recognizes it), but there are many packages from Centos 7 left.
Yes, ELevate does not help here. I did mention it just in case someone stumbles on this thread before they attempt migration.
TrevorH on CentOS Forum usually quips: “you broke it so you can keep the pieces”. That does not solve the issue either.
The ‘yum’ is just a symlink to ‘dnf’.
Limited access is annoying as it rules out fresh install? How was the system installed initially?
You OP failing command tried to update ‘rpm’. I would not touch rpm’s files if it works somehow. (Besides, looks like ‘rpm’ and ‘rpm-libs’ have to upgrade in same transaction.)
I’d rather try to install the dnf-package with rpm. What conflicts does that produce?
One can check what packages should be pulled in:
[Alma]# dnf rq --requires --resolve dnf
Last metadata expiration check: 0:33:19 ago on Thu 05 May 2022 10:16:11 AM EEST.
bash-0:4.4.20-2.el8.x86_64
python3-dnf-0:4.7.0-4.el8.noarch
[Alma]# dnf rq --requires --resolve python3-dnf
Last metadata expiration check: 0:33:34 ago on Thu 05 May 2022 10:16:11 AM EEST.
dnf-data-0:4.7.0-4.el8.noarch
libmodulemd-0:2.13.0-1.el8.i686
libmodulemd-0:2.13.0-1.el8.x86_64
platform-python-0:3.6.8-41.el8.alma.i686
platform-python-0:3.6.8-41.el8.alma.x86_64
python3-gpg-0:1.13.1-9.el8.x86_64
python3-hawkey-0:0.63.0-3.el8.x86_64
python3-libcomps-0:0.1.16-2.el8.x86_64
python3-libdnf-0:0.63.0-3.el8.x86_64
python3-rpm-0:4.14.3-19.el8_5.2.x86_64
...
The “full list” is rather long: dnf rq --requires --resolve --recursive dnf
(and one can skip those ‘i686’ versions).