In this article, you will learn how to upgrade CentOS 7 to CentOS 8.5 release. The steps described herein do not depict the official upgrade and this should not be applied to a production server yet.
Step 1: Install the EPEL Repository
To start off, install the EPL repository by running:
# yum install epel-release -y
Step 2: Install yum-utils Tools
After successfully installing EPEL, install yum-utils by running the command below.
# yum install yum-utils
Thereafter, you need to resolve RPM packages by executing the command.
# yum install rpmconf # rpmconf -a
Next, perform a clean-up of all the packages you don’t require.
# package-cleanup --leaves # package-cleanup --orphans
Step 3: Install the dnf in CentOS 7
Now install the dnf package manager which is the default package manager for CentOS 8.
# yum install dnf
You also need to remove the yum package manager using the command.
# dnf -y remove yum yum-metadata-parser # rm -Rf /etc/yum
Step 4: Upgrading CentOS 7 to CentOS 8
We are now ready to upgrade CentOS 7 to CentOS 8, but before we do so, upgrade the system using the newly install dnf package manager.
# dnf upgrade
Next, install CentOS 8 release package using dnf as shown below. This will take a while.
# dnf install http://vault.centos.org/8.5.2111/BaseOS/x86_64/os/Packages/{centos-linux-repos-8-3.el8.noarch.rpm,centos-linux-release-8.5-1.2111.el8.noarch.rpm,centos-gpg-keys-8-3.el8.noarch.rpm}
Note: CentOS 8 is dead and all the repos have been moved to vault.centos.org.
Next, upgrade the EPEL repository.
dnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
After successfully upgrading the EPEL repository, remove all the temporary files.
# dnf clean all
Remove the old kernel core for CentOS 7.
# rpm -e `rpm -q kernel`
Next, be sure to remove conflicting packages.
# rpm -e --nodeps sysvinit-tools
Thereafter, launch the CentOS 8 system upgrade as shown.
# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
Note: If you get errors about conflicting packages, for example in my case there were conflicts about the existing python36-rpmconf package. I removed this package, similarly if you get any conflicts just remove those packages and try running the above upgrade command.
Step 5: Install the New Kernel Core for CentOS 8
To install a new kernel for CentOS 8, run the command.
# dnf -y install kernel-core
Finally, install CentOS 8 minimal package.
# dnf -y groupupdate "Core" "Minimal Install"
Now you can check the version of CentOS installed by running.
# cat /etc/redhat-release
If you see the above output, I have successfully upgraded from CentOS 7 to CentOS 8.5 release.
Read Also: How to Set Up Automatic Updates for CentOS 8
Conclusion
This article concludes on how you can upgrade from CentOS 7 to CentOS 8. We hope you found this insightful.
Just updated mirror.centos.org with https://vault.centos.org/8.5.2111/BaseOS/x86_64/os/Packages/
@Luca,
Thanks, updated the repo in the article…
root@cerebro ~# dnf clean all
71 files removed
root@cerebro ~# rpm -e `rpm -q kernel`
package `rpm is not installed
package kernel` is not installed
root@cerebro ~# rpm -e –nodeps sysvinit-tools
root@cerebro ~# dnf -y –releasever=8 –allowerasing –setopt=deltarpm=false distro-sync
Extra Packages for Enterprise Linux 8 – x86_64 16 MB/s | 11 MB 00:00
CentOS Linux 8 – BaseOS 6.0 MB/s | 4.6 MB 00:00
ELRepo.org Community Enterprise Linux Repository – el7 167 kB/s | 296 kB 00:01
Nux.Ro RPMs for general desktop use 2.6 MB/s | 4.2 MB 00:01
Extra Packages for Enterprise Linux Modular 8 – x86_64 1.3 MB/s | 979 kB 00:00
Copr repo for snapcore-el7 owned by ngompa 46 kB/s | 27 kB 00:00
CentOS Linux 8 – AppStream 1.9 MB/s | 8.4 MB 00:04
CentOS Linux 8 – Extras 238 kB/s | 10 kB 00:00
Error:
Problem: The operation would result in removing the following protected packages: kernel
How to fix it now?
THIS IS NOT A SUPPORTED METHOD TO UPGRADE !!
Do NOT follow this or any other ‘upgrade‘ steps you find, as it will most likely fail unless you’re on a brand new system with almost nothing installed/configured to it, and you’ll end up with a very crippled machine that may not survive a reboot again without a full re-install.
THIS IS NOT A SUPPORTED METHOD TO UPGRADE !!
@rhanthony,
I have tried the same method on my 3 old CentOS 7 machines and they have successfully upgraded to CentOS 8…
I failed below:
It complained python conflict:
...
file /usr/lib64/python3.6/xml/sax/__pycache__/xmlreader.cpython-36.pyc from install of python3-libs-3.6.8-18.el7.x86_64 conflicts with file from package python36u-libs-3.6.8-1.el7.ius.x86_64
How come first we remove the old kernel, and only then – install new? Can the system operate without a kernel? :O
The kernel used for the server while it is running (on power) is in the RAM already. So even if you delete the rpm package of the Linux kernel (or any other running application, e.g. the ftp package on a running ftp server ) the server still is running BUT now you could not reboot it, because, after the reboot, the Linux kernel would not be found anywhere to be loaded in the RAM.
So when the steps of the article are done, your server will still run with a kernel of centos7.9, and after a reboot, it will start with the kernel of 8.1, I hope I say it correctly. The article should have mentioned in the end to do a reboot.
Running transaction check
Error: transaction check vs depsolve:
(NetworkManager >= 1.20 or dhclient) is needed by dracut-network-049-191.git20210920.el8.x86_64
rpmlib(RichDependencies) <= 4.12.0-1 is needed by dracut-network-049-191.git20210920.el8.x86_64
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'.
@Fredo,
Remove the dracut-network package and try again.
@ravi this command doesn’t help. I have the same issue as @fredo
Firstly, yum has already been removed in one of the previous steps. Secondly, dracut-network is not installed and can’t be removed with either rpm or dnf.
@Fredo I fixed the issue by running
`rpm -Va --nofiles --nodigest`
and removing all the packages with missing dependencies.In my case:
dnf -y groupupdate "Core" "Minimal Install"
Last metadata expiration check: 0:09:42 ago on Tuesday 23 November 2021 11:09:26 AM IST.
No match for group package “rhc”
Error:
Problem 1: package dracut-049-191.git20210920.el8.x86_64 requires systemd >= 239-23, but none of the providers can be installed
- package systemd-239-51.el8.i686 obsoletes systemd < 229-5 provided by systemd-219-78.el7_9.3.x86_64
- cannot install both systemd-239-51.el8.x86_64 and systemd-219-78.el7_9.3.x86_64
- package systemd-239-51.el8.x86_64 obsoletes systemd = 049-129, but none of the providers can be installed
- package systemd-sysv-219-78.el7_9.3.x86_64 requires systemd = 219-78.el7_9.3, but none of the providers can be installed
- conflicting requests
- problem with installed package systemd-sysv-219-78.el7_9.3.x86_64
Problem 2: package python3-hawkey-0.63.0-3.el8.x86_64 requires librpm.so.8()(64bit), but none of the providers can be installed
- package python3-hawkey-0.63.0-3.el8.x86_64 requires librpmio.so.8()(64bit), but none of the providers can be installed
- package python3-dnf-plugins-core-4.0.21-3.el8.noarch requires python3-hawkey >= 0.46.1, but none of the providers can be installed
- cannot install both rpm-libs-4.14.3-19.el8.x86_64 and rpm-libs-4.11.3-46.el7_9.x86_64
- package dnf-plugins-core-4.0.21-3.el8.noarch requires python3-dnf-plugins-core = 4.0.21-3.el8, but none of the providers can be installed
- package deltarpm-3.6-3.el7.x86_64 requires librpm.so.3()(64bit), but none of the providers can be installed
- package deltarpm-3.6-3.el7.x86_64 requires librpmio.so.3()(64bit), but none of the providers can be installed
- conflicting requests
- problem with installed package deltarpm-3.6-3.el7.x86_64
Problem 3: package python3-dnf-4.7.0-4.el8.noarch requires dnf-data = 4.7.0-4.el8, but none of the providers can be installed
- package dnf-4.7.0-4.el8.noarch requires python3-dnf = 4.7.0-4.el8, but none of the providers can be installed
- cannot install both dnf-data-4.7.0-4.el8.noarch and dnf-data-4.0.9.2-2.el7_9.noarch
- package yum-4.7.0-4.el8.noarch requires dnf = 4.7.0-4.el8, but none of the providers can be installed
- package python2-dnf-4.0.9.2-2.el7_9.noarch requires dnf-data = 4.0.9.2-2.el7_9, but none of the providers can be installed
- conflicting requests
- problem with installed package python2-dnf-4.0.9.2-2.el7_9.noarch
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
@Sai,
Does the following command is successful? I suggest you re-run the following command and see if there are any package conflicts, if yes remove those conflicts and run the command again.
Hi! I see more than 170 comments about this article. Has the procedure been updated? I got stuck at distro-sync step D:
@Luca,
The article has been updated and included instructions for upgrading from CentOS 7.x to CentOS 8.5…
Will this cause the wiping of data on the server?
# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
Last metadata expiration check: 0:34:40 ago on Sun 14 Nov 2021 12:48:00 PM IST.
Error:
Problem: The operation would result in removing the following protected packages: kernel-plus
Hi! How to solve the issue?
No, has not been updated. Use another source (Server Fault for example).
@Milan,
We are in the process to update this article, give us some time to research, test, and document it..
@Milan,
The article has been updated and included instructions for upgrading from older CentOS 7 to CentOS 8.5 release…
Can you please link it? I just set up my VM for testing. Thanks :)
@Luca,
The article has been just updated with new instructions for upgrading from older CentOS 7 to CentOS 8.5 release…
Do test it, it will work 100% without any errors…
This guide while has good intentions should simply not be followed. It doesn’t cover handling dependencies and leaves out a few steps such as kernel modules being updated correctly. Historically, Red Hat has not pushed the idea that major upgrades are supported, and while it is possible, it’s only worth chasing if these steps are properly documented, which they clearly are not in this article.
On the last command, I added
--skipbroken
, because I could not resolve all dependencies.My question is, when you reboot, which kernel is supposed to boot up the system? With the command
uname -r
I still get 3.10.0-1160.36.2.el7.x86_64, old version.With:
Installed Packages
kernel.x86_64 3.10.0-1160.36.2.el7 @System
kernel.x86_64 4.18.0-305.12.1.el8_4 @baseos
@Viselda,
You need to define the Kernel version in your Grub configuration to boot the defined kernel…
Thanks for answering!
What about the conflicts? How can I solve them because I cannot run update/upgrade commands?
Here is part of what I get:
file /usr/lib/python3.6/site-packages/setuptools/command/__pycache__/upload.cpython-36.opt-1.pyc from install of platform-python-setuptools-39.2.0-6.el8.noarch conflicts with file from package python3-setup tools-39.2.0-10.el7.noarch
file /usr/lib/python3.6/site-packages/setuptools/command/__pycache__/upload.cpython-36.pyc from install of platform-python-setuptools-39.2.0-6.el8.noarch conflicts with file from package python3-setuptools- 39.2.0-10.el7.noarch
file /usr/lib/python3.6/site-packages/setuptools/command/__pycache__/upload_docs.cpython-36.opt-1.pyc from install of platform-python-setuptools-39.2.0-6.el8.noarch conflicts with file from package python3- setuptools-39.2.0-10.el7.noarch
file /usr/lib/python3.6/site-packages/setuptools/command/__pycache__/upload_docs.cpython-36.pyc from install of platform-python-setuptools-39.2.0-6.el8.noarch conflicts with file from package python3-setupt ools-39.2.0-10.el7.noarch
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
UPDATE: I cannot recommend this upgrade method. I have made some progress, but am still in dependency hell. I have done
'yum --best --allowerasing -x upgrade a* b*'
and so on, iterating through the alphabet and adding packages that break the process.I still have a list I can’t upgrade, and still have a list that prevents distsync. I am concerned that any reboot will completely hose the system, especially as I run headless. I am on the verge of major surgery (removing mariadb, for example), but even then a dnf upgrade is required but I cannot do so because it is protected (and would require erasing). At this point, I need to sink $$$ into the project, build a completely new system, and migrate each package and config over piece by piece. Grr.
The current output of distsync:
rror: transaction check vs depsolve:
(gcc >= 8 with gcc < 9) is needed by annobin-9.50-1.el8.x86_64
rpmlib(RichDependencies) = 3:10.3.27 if mariadb) is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
(mariadb-connector-c-config = 3.1.11-2.el8_3 if mariadb-connector-c-config) is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
rpmlib(RichDependencies) <= 4.12.0-1 is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
(ipa-selinux if selinux-policy-targeted) is needed by ipa-common-4.9.2-3.module_el8.4.0+780+c53619b9.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by ipa-common-4.9.2-3.module_el8.4.0+780+c53619b9.noarch
(annobin if gcc) is needed by redhat-rpm-config-125-1.el8.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-125-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'.
Trying to install via DNF gives error "none of the providers can be installed" e.g:
– package ipa-common-4.9.2-3.module_el8.4.0+780+c53619b9.noarch requires (ipa-selinux if selinux-policy-targeted), but none of the providers can be installed
In the last step:
I get the following error:
Running transaction check
Error: transaction check vs depsolve:
(mariadb >= 3:10.3.27 if mariadb) is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
(mariadb-connector-c-config = 3.1.11-2.el8_3 if mariadb-connector-c-config) is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
rpmlib(RichDependencies) = 1.20 or dhclient) is needed by dracut-network-049-135.git20210121.el8.x86_64
rpmlib(RichDependencies) <= 4.12.0-1 is needed by dracut-network-049-135.git20210121.el8.x86_64
I also tried the following command, but that didn't work either. Help because I'm stuck here.
When running the distrosync, I get the following error(s):
Running transaction check
Error: transaction check vs depsolve:
(gcc >= 8 with gcc < 9) is needed by annobin-9.50-1.el8.x86_64
rpmlib(RichDependencies) = 3:10.3.27 if mariadb) is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
(mariadb-connector-c-config = 3.1.11-2.el8_3 if mariadb-connector-c-config) is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
rpmlib(RichDependencies) = 1.20 or dhclient) is needed by dracut-network-049-135.git20210121.el8.x86_64
rpmlib(RichDependencies) <= 4.12.0-1 is needed by dracut-network-049-135.git20210121.el8.x86_64
(flatpak-selinux = 1.8.5-3.el8 if selinux-policy-targeted) is needed by flatpak-1.8.5-3.el8.x86_64
rpmlib(RichDependencies) <= 4.12.0-1 is needed by flatpak-1.8.5-3.el8.x86_64
(ipa-selinux if selinux-policy-targeted) is needed by ipa-common-4.9.2-3.module_el8.4.0+780+c53619b9.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by ipa-common-4.9.2-3.module_el8.4.0+780+c53619b9.noarch
(annobin if gcc) is needed by redhat-rpm-config-125-1.el8.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-125-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'.
For these "needed by ” is it safe to remove (and possibly reinstall) those to run the distrosync? Or have I screwed something up?
and try again. Basically, you need to get rid of all dependencies of the packages I posted above.
How would this work? Removing openssl via dnf would want to remove dnf itself, which would be needed for the next step (even if it would remove the running program).
This is now giving me some unresolved packages and not letting me continue. But these steps also had me remove my kernel beforehand – so I appear to now be without a kernel, and unable to upgrade!? RPM commands now fail with some non-descript message about a repo (doesn’t tell me which one) being configured wrong. I think I’ve hosed my system…
should be
Thanks! This was really helpful, and also had a very annoying bug.
You only instruct to install `kernel-core`, while I think probably everyone will also need to install `kernel-modules`. I followed the instructions to upgrade my remote VPS, rebooted and there was no network!! Turns out the drivers are actually in the kernel-modules rpm. Ofc installing anything with a broken NIC driver is very painful. So, I pasting this to hopefully save someone else that pain.
Thanks!
Thanks for the guide.
Step #4: the mirror URL should be:
dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/{centos-linux-repos-8-2.el8.noarch.rpm,centos-linux-release-8.4-1.2105.el8.noarch.rpm,centos-gpg-keys-8-2.el8.noarch.rpm}
@Vincent,
Thanks, updated the mirror link in the article…
Can any guide if have a solution for this issue
Running scriptlet: libwbclient-4.13.3-3.el8.x86_64 1213/1213
Running scriptlet: kernel-core-4.18.0-305.7.1.el8_4.x86_64 1213/1213
Broadcast message from systemd-journald@vl070238-app02-pd-smp-wts-aws-mum-in-vf.vfirst.local (Fri 2021-07-09 19:37:35 IST):
dracut[27540]: Can’t write to /boot/301e98982ddb4aa99dc45bc92cc698d3/4.18.0-305.7.1.el8_4.x86_64: Directory /boot/301e98982ddb4aa99dc45bc92cc698d3/4.18.0-305.7.1.el8_4.x86_64 does not exist or is not accessible.
Message from syslogd@vl070238-app02-pd-smp-wts-aws-mum-in-vf at Jul 9 19:37:35 …
dracut:Can’t write to /boot/301e98982ddb4aa99dc45bc92cc698d3/4.18.0-305.7.1.el8_4.x86_64: Directory /boot/301e98982ddb4aa99dc45bc92cc698d3/4.18.0-305.7.1.el8_4.x86_64 does not exist or is not accessible.
Can’t write to /boot/301e98982ddb4aa99dc45bc92cc698d3/4.18.0-305.7.1.el8_4.x86_64: Directory /boot/301e98982ddb4aa99dc45bc92cc698d3/4.18.0-305.7.1.el8_4.x86_64 does not exist or is not accessible.
warning: %posttrans(kernel-core-4.18.0-305.7.1.el8_4.x86_64) scriptlet failed, exit status 1
Error in POSTTRANS scriptlet in rpm package kernel-core
Running scriptlet: authselect-libs-1.2.2-2.el8.x86_64 1213/1213
Running scriptlet: httpd-2.4.37-39.module_el8.4.0+778+c970deab.x86_64 1213/1213
Running scriptlet: authselect-compat-1.2.2-2.el8.x86_64 1213/1213
Running scriptlet: tuned-2.15.0-2.el8_4.1.noarch 1213/1213
Running scriptlet: microcode_ctl-4:20210216-1.20210525.1.el8_4.x86_64 1213/1213
/usr/lib/dracut/modules.d/40network/module-setup.sh: line 33: warning: command substitution: ignored null byte in input
/usr/lib/dracut/modules.d/40network/module-setup.sh: line 33: warning: command substitution: ignored null byte in input
/usr/lib/dracut/modules.d/40network/module-setup.sh: line 33: warning: command substitution: ignored null byte in input
/usr/lib/dracut/modules.d/40network/module-setup.sh: line 33: warning: command substitution: ignored null byte in input
OS Getting crash by following given steps.
Moderate this comment, if you like: this web page, and a half-dozen like it helped me completely trash my Centos 7 system. Not a VM. A Real Box.
Over 200 problems during dnf updates. From mundane to ridiculous. openssl, vim (VIM!), irreconcilable differences. Talk about bad advice.
All to get to centos 8.x so I could run migrate the script to get on rocky Linux. Now I’m doing a bare install of rocky Linux, just like with every release of centos.
Take this page down. You’re going to get more negative feedback if you don’t.
Bump. Why are people still trying this? More and more are reporting having a train wreck. Just don’t do it. I’m now running Rocky Linux, but it was not painless. There were differences between CentOS and RL. Just do the clean install. Good luck to you all.
Meant to say CentOS 8 is not fully supported in the future – https://blog.centos.org/2020/12/future-is-centos-stream/.
I had the same issue with mariadb. I removed mariadb, and now I end up with the following:
Running transaction check
Error: transaction check vs depsolve:
(gcc >= 8 with gcc < 9) is needed by annobin-9.23-1.el8.ppc64le
rpmlib(RichDependencies) <= 4.12.0-1 is needed by annobin-9.23-1.el8.ppc64le
(annobin if gcc) is needed by redhat-rpm-config-123-1.el8.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-123-1.el8.noarch
There doesn't seem to be a way to fix this issue as far I can see as it appears to be an issue with the CentOS 8 repositories.
The follow-up to my own problem.
Disabling the AppStream repo allowed me to upgrade, so the distro-sync process ran twice. Once with the appstream repo disabled (which did upgrade the system) and then a 2nd time (with appstream enabled) which ‘completed’ the upgrade process. I then ran a dnf upgrade to ensure everything upgraded okay.
I had a bunch of orphaned el7 packages out there, so I did a quick ‘yum list | grep el7’ to identify them, and I removed those manually to prevent any future compatibility problems.
Had to add “–allowerasing” to make mine work?
Also, change “upgrade” to “install“.
I had the same problem and found a workaround:
disable AppStream repo
enable AppStream repo
Thanks for the fix here is the command I used to get it to work:
After the installation, I also ran:
Everything looks good after the reboot now, thanks again.
I have upgraded centos 7.9 to centos 8.3.2011,
but it is still showing old kernel version.
Alfista – You may see a section like “weak dependencies” that includes some of the packages that require these dependencies. Python3 and Perl stuff has to be removed.
Hope to see the same guide for an upgrade from CentOS 7 to Rocky Linux 8 when will be available, this will save a lot of work in migration
@Luca,
Sure, once Rocky Linux 8 available, if instructions are there to upgrade from CentOS to Rocky Linux, will surely publish the guide on same..
Hi,
I have a problem with transaction check:
Running transaction check
Error: transaction check vs depsolve:
(gcc >= 8 with gcc < 9) is needed by annobin-9.23-1.el8.x86_64
rpmlib(RichDependencies) = 3:10.3.27 if mariadb) is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
(mariadb-connector-c-config = 3.1.11-2.el8_3 if mariadb-connector-c-config) is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
rpmlib(RichDependencies) <= 4.12.0-1 is needed by mariadb-connector-c-3.1.11-2.el8_3.x86_64
(annobin if gcc) is needed by redhat-rpm-config-123-1.el8.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-123-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'.
Please can you help me?
Thanks.
Delete mariadb then run upgrade again.
Will, it does not delete all repositories? While I have follower one solution here on the net and the result was deleting all repositories and then I needed to add it manually and it was hard to get and install it back.
Thanks.
I am also experiencing the same issue.
Please add a big warning at the top: This may crash your system and cause ants to invade your CPU.
I followed the instructions on a VM and everything worked. I then did this on one of my servers and lost everything on it. Lots of Googling and hairpulling showed that a number of drivers have been removed from CentOS 8 which means that it just won’t run on older hardware.
I just tried it on a fresh install of CentOS 7, it all appeared to work but did not survive a reboot.
Please help me…
$ sudo dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
is giving error
Problem: The operation would result in removing the following protected packages: kernel
This command gives error:
Next, install CentOS 8 release package using dnf as shown below. This will take a while.
@Hasan,
I’ve corrected the commands in the article, try again it should work…
Thank you, for the correction.
Worked for me with the mods suggested by David Klassen.
At this step I got a fatal error:
Error:
file /usr/lib/python3.6/site-packages/rpmconf/__pycache__/__init__.cpython-36.opt-1.pyc from install of python3-rpmconf-1.0.21-1.el8.noarch conflicts with file from package python36-rpmconf-1.0.22-1.el7.noarch
So I just removed all the rpmconf packages:
Then the upgrade action was successful, and I continued on. Maybe there is a better web page out there, but being careful in this process and backing up your data is always a good idea. The site did say not to perform on a production server.
I then ran into errors executing this:
but when I excluded yum it at least completed:
At that stage I assumed given the kernel installed well, it needs a reboot to test whether it would be successful.
The system came back-up and I installed a program to test dnf is working. Seems like it is.
Please update or remove it as it’s only causing harm.
This guide is simply not working at all, you will end up with a system in a bad state.
Yeah, I broke a VPS by mistake.
Don’t use this guide I learned the hard way
Thank you for this post. I got an error:
sudo dnf -y –releasever=8 –allowerasing –setopt=deltarpm=false distro-sync
[sudo] password for yjiang:
CentOS-8 – Base 545 kB/s | 2.2 MB 00:04
Remi’s PHP 7.2 RPM repository for Enterprise Linux 7 – x86_64 170 kB/s | 221 kB 00:01
MySQL 8.0 Community Server 4.1 MB/s | 1.5 MB 00:00
IUS for Enterprise Linux 7 – x86_64 1.7 MB/s | 624 kB 00:00
MySQL Connectors Community 193 kB/s | 94 kB 00:00
Safe Remi’s RPM repository for Enterprise Linux 7 – x86_64 615 kB/s | 2.3 MB 00:03
CentOS-7 – SCLo sclo 496 kB/s | 1.1 MB 00:02
geekery repository 0.0 B/s | 0 B 00:00
CentOS-7 – SCLo rh 1.2 MB/s | 14 MB 00:11
Extra Packages for Enterprise Linux 7 – x86_64 8.1 MB/s | 16 MB 00:02
CentOS-8 – AppStream 1.8 MB/s | 5.8 MB 00:03
MySQL Tools Community 505 kB/s | 553 kB 00:01
CentOS-8 – Extras 43 kB/s | 8.1 kB 00:00
Failed to synchronize cache for repo ‘geekery’, ignoring this repo.
Error:
Problem: The operation would result in removing the following protected packages: kernel
The instructions show the user running as root.
Likely not a time you want to use sudo.
My Baremetal running centos7 started giving segmentation faulty post this. Lost all the data on the host. Please follow the procedure at your own risk.
Thank you so much for the useful article on CentOS Upgrade…
Hi Team,
I did below, still no luck. There is no value under /etc/yum/protected.d/.
Please help
My issue got solved and I could complete the upgrade. I had a base repo issue…
I am completing this process and ran into the same issue as you. How did you resolve the base repo issue?
Hi,
I tried to follow this guide to upgrade from centos7 to 8, I didn’t manage with the upgrade but most of the packages are in el8, I am also having problems installing packages with the below error:
Kindly assist.
Regards
Do this:
1. Try to repair database as suggested:
2. If it still does not work, reinstall flatpak packages:
3. If it still does not work, remove flatpak packages and install them again:
4. If dnf does not work, use rpm:
5. If there are dependecies, remove with them:
6. If you are sure what you are doing, use:
You can try removing Perl and python packages… and run the command again.. it worked for me
The latest packages for core:
# dnf upgrade -y http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/{centos-release-8.2-2.2004.0.1.el8.x86_64.rpm,centos-gpg-keys-8.2-2.2004.0.1.el8.noarch.rpm,centos-repos-8.2-2.2004.0.1.el8.x86_64.rpm}
When trying to group update about “Core” “Minimal Install“, centos system has error in yum.
Can I get the solution?
Environment
– CentOS 7.5
** Error Messages
Try to use another way (as of https://serverfault.com/questions/985478/how-do-i-update-a-system-from-centos-7-to-centos-8):
Is it solved? I m also getting the same error.
Repo base and updates should work. Fix this first.
I am also getting the same error, I have no repo issues, I tried removing dnf from /etc/dnf/protected.d/ and /etc/yum/protected.d/. But no luck
These docs should be removed as they DO NOT and WILL NOT work. Even on a clean Centos 7 system, this process will fail because of dependencies.
This procedure will break your system. It will at best, leave you spinning on the dependency check that will never complete (8+ hours and it didn’t complete), or leave you with a difficult to resolve circular dependency with python or GCC.
There are ways to unbrick a system by manually downloading and manually extracting packages to jumpstart a DNF reinstallation of broken packages, but it’s not worth it.
This doc worked for me as a charm. Thank you so much.
I’m glad the guide was of much assistance.
Hi James,
Thank you for the thoughtful article.
After following this closely, I was was able to upgrade with no issue — just an old python 3.6 repo that I removed, based on the conflict report.
Very much enjoying the new Web Cockpit.
Thanks again!
Trevor
Thanks Trevor, you are welcome.
I’ve got the following error on distro-sync step:
Case anyone has ideas about how to fix it
Adding
--best
parameter to distro-sync command made it work.I’ve had the same problem and resolved it with:
then
and reinstall perl (if necessary)
This break up my distro thanks a bunch…
Dude, these “howtos” arrive every time there is a major version update and they NEVER work for real installations.
1) No Centos system I have ever run will let you remove any kernel, because, “IT IS THE KERNEL” and it refuses to do so using yum, or dnf.
2) Even when you skip all of that, and just jump to the upgrade of installed packages, you end up needing to actually remove everything on the system, and then basically start from a vanilla install, and that probably still won’t work.
I ALWAYS end up just fully reinstalling using media, after backing up or migrating the necessary bits from the current install.
These tutorials are always worthless in the real world.
I believe these guys are working with a fedora or bleeding-edge centos development branch with certain features turned off, which are never disclosed.
Also, one of the “updated” comments from a reader back in the spring indicated that they had some issues with
python36-*
and just “removed it” to continue. Well, I just figured I would remove the python packages that were also proving to be troublesome since this was just a development hypervisor for my openshift cluster and some other stuff. (I.E. all the important stuff is on the hardware raid built into the chassis, and I use installation ssds to run the actual OS.)So I just wanted to see how far I would get, and maybe for possibly the third major release in a row won’t force full vanilla install at some point.
Welp, sure enough, once I started removing python3 stuff that it was complaining about, dnf (python app) started giving errors about not being able to find named module, etc….
However, if you remember from earlier steps, you have already fully removed “yum” in place of “dnf.”
However, I have also come across this exact situation when migrating from CentOS 6 to CentOS 7 before they came up with the nifty “in place update” tooling that made it so easy and less problematic.
So yup, these articles are always a trip, because they never really work.
I have to assume that just like the Linux “gurus” of old, where the world “worked on their box” but when you tried to find out how to build the world on yours, you were always left floating in space as they confidently indicated that “it works on their box….”
I think these articles are based on a minimum-proof-of-concept that no one is actually running. (Like making some minimalist install that would require so much removal of items and packages to get back to, that you may as well just install fully with new media.)
“1) No Centos system I have ever run will let you remove any kernel, because, “IT IS THE KERNEL” and it refuses to do so using yum, or dnf.”
Well, use rpm and put
--nodeps
and you can remove the kernel. But yes, if something goes wrong, you will end up bricking the system, there will be no kernel to boot into. I was able to upgrade to 8.2, had torpm -e --nodeps
the kernel; also had to remove devel packages – what I did was list the devel packages that were being removed into a file and reinstall all of them after the base upgrade was finished; had to do this for about 25 packages. Also, the upgrade usually works only at minimal install level, had to then group install development tools, systems tools, security tools, etc etc. A real pain, but possible.Thanks for the update, but I have been holding off getting back onto that test hypervisor because I have to basically re-install python because now dnf doesn’t know how to run using python 2 or whatever is currently installed.
There is always some “bricking” command included in these tutorials. I was just wondering if that were still the case, and sure enough, once I got over the hurdles referenced by the other guys, I ended up with a system that can’t install anything else, because I have uninstalled python3 and yum is gone so nothing cares about python2 or whatever is currently installed. LOL…
Other correction on step4:
if you will received an error like:
kernel(wait_for_completion) = 0x6d0aba34 is needed by (installed) kmod-kvdo-6.1.3.7-5.el7.x86_64
kernel(wait_for_completion_interruptible) = 0x015ddbdc is needed by (installed) kmod-kvdo-6.1.3.7-5.el7.x86_64
kernel(wake_up_process) = 0xe65cdceb is needed by (installed) kmod-kvdo-6.1.3.7-5.el7.x86_64
kernel(yield) = 0x760a0f4f is needed by (installed) kmod-kvdo-6.1.3.7-5.el7.x86_64
you need to remove this packages in order to proceed further:
This upgrade works with some little corrections:
Step 4
=====
should be executed as one command line and with the updated links to avoid errors.
For example:
# dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-repos-8.2-2.2004.0.1.el8.x86_64.rpm http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.2-2.2004.0.1.el8.x86_64.rpm http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.2-2.2004.0.1.el8.noarch.rpm
@Francesco,
Thanks, I have updated the command in the article, as suggested by you…
Ugh! I wish I had read these comments before I followed these instructions and destroyed my Centos 7 installation. What exactly is the point of posting these instructions?
@John,
We clearly stated that: The steps described herein do not depict the official upgrade and this should not be applied to a production server yet.
The only path to upgrade 7 to 8 is a full reinstall and migration.
Don’t follow this article.
This doesn’t work.
@VP,
We clearly stated in the beginning “The steps described herein do not depict the official upgrade and this should not be applied to a production server yet.”
Thank you for responding @Ravi.
I want to mention that I always get wonderful articles and steps in TecMint site for a lot of tasks and it’s very useful for me and for all who are looking for the same.
Regarding this article, obviously I did not perform the steps on the production server. I had read your instructions on the top. And I think no one would directly implement such sort of work directly on the production server. It did not work for the test environment either.
Many have given some corrections and other helpful links in the comment. I followed them also but still, the test didn’t complete successfully.
Maybe it had worked earlier but I think no longer now.
But thanks for giving me a good option to try.
Regards.
Is working.
The only problem I got conflict with some python packages in time of upgrade after the command:
Simple remove conflict package:
and repeat:
Next thing was network interfaces renamed and badly configured ( old “eth” -> new “ens”) – in this case, “nmtui” is Your friend
Thanks Ravi for your great tutorial
Some quirks are answered here:
https://serverfault.com/a/1014477/263791
.I upgraded my CentOS kernel 7 to 8, but some packages didn’t.
I tried:
and I get an error:
Error: Transaction check error:
file /usr/share/pixmaps/poweredby.png from install of centos-logos-httpd-80.5-2.el8.noarch conflicts with file from package centos-logos-70.0.6-3.el7.centos.noarch
Then I wanted to remove the old package:
Guess what:
error: Failed dependencies:
system-logos >= 7.92.1-1 is needed by (installed) httpd-2.4.6-90.el7.centos.x86_64
system-logos is needed by (installed) plymouth-0.8.9-0.32.20140113.el7.centos.x86_64
When I wanted to know about those packages:
and
I am stuck!
I would appreciate any help.
You have to finish last dnf transaction, try to upgrade the system (
--nobest, --skip-broken
, etc) or remove all duplicates at once (dnf repoquery --duplicates
).It didn’t work! The same fail at step 4.
I would also add SELinux relabel after all these steps.
I’m also stuck on Step #4 but a little further down at “Thereafter, launch the CentOS 8 system upgrade as shown”:
[root@life01 ~]# dnf -y –releasever=8 –allowerasing –setopt=deltarpm=false distro-sync
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
CentOS-8 – Base 0.0 B/s | 0 B 00:00
CentOS-8 – Updates 0.0 B/s | 0 B 00:00
CentOS-8 – Extras 0.0 B/s | 0 B 00:00
Failed to synchronize cache for repo ‘base’, ignoring this repo.
Failed to synchronize cache for repo ‘updates’, ignoring this repo.
Failed to synchronize cache for repo ‘extras’, ignoring this repo.
Last metadata expiration check: 0:02:16 ago on Tue 21 Apr 2020 06:56:57 AM UTC.
Error:
Problem: The operation would result in removing the following protected packages: dnf, systemd
Obviously, I don’t want to get rid of dnf or systemd. I’m digging around but thought I’d check if anyone has run into this. There’s also the “Failed to synchronize cache for repo” warning but I’ll look into that later.
The given command is not complete. You need to add the minor version too (8.1)
I managed to upgrade two of my servers, but was unable to update the majority of my servers and simply had to reinstall (rebuild them). This is the main command that I used for the servers I managed to upgrade using the above process.
dnf upgrade -y http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/{centos-release-8.1-1.1911.0.8.el8.x86_64.rpm,centos-gpg-keys-8.1-1.1911.0.8.el8.noarch.rpm,centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm
.I also found MonkeyPet’s contribution to dependency hell very useful.
Here is a reminder
Now for the real stinger.
Even after navigating the following problem dependency problem with the aid of MonkeyPet’s suggestion
my servers upgraded but crashed on boot up because their local storage controllers could not be recognized (you just get an infinite hang on boot uploading the newly upgraded kernels). The reason why is because a large number of storage controller drivers were removed from the RHEL8.x and hence Centos 8.x base kernel during RHEL 8.x development.
This affects a number of common workhorses Entry and Medium Level servers some of which were on sale 3 years ago (e.g. Dell R210, R510, R710). See the list of deprecated drivers here;
https://elrepo.org/linux/dud/el8/x86_64
The drivers can only be installed as part of the Driver Update Disk (DUD) process during a reinstall, so this rules out upgrading from Centos7 to Centos8 for a fair number of servers. Take heed.
Thank bro. Exactly my situation with Dell 610
I have a segmentation fault ins response to “
dnf -y remove yum yum-metadata-parser
.What could be the solution?
Hi,
I’m really at a loss about a weird problem after “rebooting”. I find that my network config is messed up. The 1st NIC eth0 is now renamed en1sp0, and the network config is not respecting the ifcfg-enp1s0 file.
Whereas, the ifcfg-enp1s0 says:
I just couldn’t get it to respect these settings at all! I read many articles, which said that NetworkManager now controls these settings, but everything says it respects the ifcfg files in /etc/sysconfig/network-scripts.
So, can anyone help how the /32 address is coming up?
Hi,
My Centos 7 install fails at the “dnf install” lines under Step 4:
[root@se63 ~]# dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm
Last metadata expiration check: 0:01:17 ago on Mon 30 Mar 2020 01:11:24 AM +06.
centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm 17 kB/s | 12 kB 00:00
Error:
Problem: conflicting requests
- nothing provides centos-gpg-keys = 8.1-1.1911.0.8.el8 needed by centos-repos-8.1-1.1911.0.8.el8.x86_64
- nothing provides system-release = 8.1 needed by centos-repos-8.1-1.1911.0.8.el8.x86_64
[root@se63 ~]# dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.1-1.1911.0.8.el8.x86_64.rpm
Last metadata expiration check: 0:01:37 ago on Mon 30 Mar 2020 01:11:24 AM +06.
centos-release-8.1-1.1911.0.8.el8.x86_64.rpm 25 kB/s | 21 kB 00:00
Error:
Problem: conflicting requests
- nothing provides centos-gpg-keys = 8.1-1.1911.0.8.el8 needed by centos-release-8.1-1.1911.0.8.el8.x86_64
- nothing provides centos-repos = 8.1-1.1911.0.8.el8 needed by centos-release-8.1-1.1911.0.8.el8.x86_64
[root@se63 ~]# dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.1-1.1911.0.8.el8.noarch.rpm
Last metadata expiration check: 0:01:47 ago on Mon 30 Mar 2020 01:11:24 AM +06.
centos-gpg-keys-8.1-1.1911.0.8.el8.noarch.rpm 41 kB/s | 11 kB 00:00
Error:
Problem: problem with installed package centos-release-7-7.1908.0.el7.centos.x86_64
- package centos-gpg-keys-8.1-1.1911.0.8.el8.noarch conflicts with centos-release < 8.0-0.1905.0.10 provided by centos-release-7-7.1908.0.el7.centos.x86_64
- conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)
The previous command ran perfectly:
[root@se63 ~]# dnf upgrade
Extra Packages for Enterprise Linux 7 - x86_64 5.9 MB/s | 16 MB 00:02
Docker main Repository 32 kB/s | 28 kB 00:00
CentOS-7 - Base 5.1 MB/s | 10 MB 00:02
CentOS-7 - Updates 4.6 MB/s | 9.4 MB 00:02
CentOS-7 - Extras 80 kB/s | 259 kB 00:03
Dependencies resolved.
Nothing to do.
Complete!
What could be going wrong?
Solved it! The comment from “bartmantv” was really helpful!
I stumbled upon another error that was solved by the “MonkeyPet” solution!
Thank you, everyone!
I’m trying to upgrade centos, but I’m having problems after
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'.
I tried:
and also removed the package with issues in:
and after that I did.
But, the same problem.
Tried:
Tried again:
and got:
No match for argument: redhat-rpm-config
No packages marked for removal.
Tried also
but still the same problem.
Any help with what is the problem?
It’s pretty good, with minor flaws though:
Firstly, I ran into difficulty remove kernel rpm because I’m using vdo support. You have to remove that.
Then too, you must install all 3 centos-release/repos/keys rpm in one command since they are dependency loop, old school headache.
There are lots of transactions fail during ‘dnf upgrade‘ but basically because I’m using some 3rd party repos and I can fix that later.
Thanks anyway, it’s a good one.
Okay, it magically came back after I couldn’t even ssh, was dumping a random error. Came back to shell and I was able to fix the rest
still sketchy..! backup first / no production!
Even if the process might work, it is not a tested procedure by Red Hat. Why not use Leapp, which is what Red Hat supports?
If you get into dependencies hell try:
This hint helped, I had to do this for GCC in my case.
I just did this myself had to modify the rpm installation step, this needs to be a single install command including all the files
So instead of this step:
anonymous previously on Feb 7 stated this, so your update was close, it has to be one line for dependencies to work. I’ve escaped the newline so it can formatted for webpage use…
Thanks, this really helped
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
It doesn’t seem to upgrade the el7 RPMs to the el8 versions. Now that 8.1 is out, is the repos setup for that upgrade is conflicting with the upgrade process?
I tried
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false upgrade
But that didn’t work either. Now the system will download a whole bunch of RPMs and not install them.
Wonder if I go to the repo files and hard code the path to the 8.0 repo if it would at least get me to that release then the 8.1 can take over from there.
To fix the “rpmlib(RichDependencies) <= 4.12.0-1" problem you need newer rpm on CentOS 7.
Upgrade the packages "rpm", "rpm-libs", "rpm-plugin-selinux", "python2-rpm" from:
https://cbs.centos.org/kojifiles/packages/rpm/4.13.0.2/1.el7.c8/x86_64/
change the step
# dnf -y upgrade http://mirror.bytemark.co.uk/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm
as per:
# dnf install http://less.cogeco.net/CentOS/8/BaseOS/x86_64/os/Packages/centos-repos-8.1-1.1911.0.8.el8.x86_64.rpm
# http://less.cogeco.net/CentOS/8/BaseOS/x86_64/os/Packages/centos-release-8.1-1.1911.0.8.el8.x86_64.rpm
# http://less.cogeco.net/CentOS/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.1-1.1911.0.8.el8.noarch.rpm
Thanks, but it doesn’t work, at the moment the new release is
centos-release-8.1-1.1911.0.8.el8.x86_64.rpm
. The upgrade just stop[root@localhost ~]# dnf -y upgrade http://mirror.bytemark.co.uk/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.1-1.1911.0.8.el8.x86_64.rpm
Last metadata expiration check: 1:33:06 ago on Sun 26 Jan 2020 12:15:03 PM CET.
centos-release-8.1-1.1911.0.8.el8.x86_64.rpm 78 kB/s | 21 kB 00:00
Dependencies resolved.
Problem: cannot install the best update candidate for package centos-release-7-7.1908.0.el7.centos.x86_64
- nothing provides centos-gpg-keys = 8.1-1.1911.0.8.el8 needed by centos-release-8.1-1.1911.0.8.el8.x86_64
- nothing provides centos-repos = 8.1-1.1911.0.8.el8 needed by centos-release-8.1-1.1911.0.8.el8.x86_64
========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Skipping packages with broken dependencies:
centos-release x86_64 8.1-1.1911.0.8.el8 @commandline 21 k
Transaction Summary
========================================================================================================================================================================
Skip 1 Package
Nothing to do.
Complete!
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# rpm -ivh http://mirror.bytemark.co.uk/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.1-1.1911.0.8.el8.noarch.rpm
Retrieving http://mirror.bytemark.co.uk/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.1-1.1911.0.8.el8.noarch.rpm
warning: /var/tmp/rpm-tmp.futBz3: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
error: Failed dependencies:
centos-release < 8.0-0.1905.0.10 conflicts with centos-gpg-keys-8.1-1.1911.0.8.el8.noarch
[root@localhost ~]#
Try to do things in the following order:
dnf -y upgrade http://mirror.bytemark.co.uk/centos/8.0.1905/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm
dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.1 -1.1911.0.8.el8.noarch.rpm
This should be enough to install and upgrade all the necessary packages
(remove the accidental space in the second package name)
I get the following error:
> Problem: package centos-gpg-keys-8.1-1.1911.0.8.el8.noarch conflicts with centos-release - conflicting requests
> - problem with installed package centos-release-8.0-0.1905.0.9.el8.x86_64
Thanks for your commands, sorry I can’t test, I had done a fresh install.
You need to issue the command in one single line:
dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-repos-8.1-1.1911.0.9.el8.x86_64.rpm http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.1-1.1911.0.9.el8.x86_64.rpm http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8.1-1.1911.0.9.el8.noarch.rpm
This works!
Nice!
Need to use
dnf -y upgrade http://mirror.bytemark.co.uk/centos/8.0.1905/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm
as 8.1 is out.This works
Please help:
dnf upgrade
shows this error: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
Thanks! ASAP.
Does `
dnf upgrade --allowerasing
` resolve this?So I completed your guide to upgrading CentOS 7 to 8 after fixing the issue I mentioned earlier. But after I rebooted, I only see the CentOS 7 boot loader and none of the boot loaders can boot because CentOS 7 is gone. I can still boot into rescue mode – is there a way to edit the boot screen to pick up the new CentOS 8 boot loader?
Total mess – Do not do it
I just stuck in it. nor you can update with DNF or any way to reinstall yum again.!!!
can not run any program like this:
/usr/sbin/squid: symbol lookup error: /usr/sbin/squid: undefined symbol: _ZN7libecap4NameC1ERKNSt7__cxx1112basi...IcESaIcEE
Last metadata expiration check: 0:11:25 ago on Thu 26 Dec 2019 07:49:40 PM +0330.
Error:
Problem: package python3-dnf-4.0.9.2-5.el8.noarch requires dnf-data = 4.0.9.2-5.el8, but none of the providers can be installed
– package dnf-4.0.9.2-5.el8.noarch requires python3-dnf = 4.0.9.2-5.el8, but none of the providers can be installed
– cannot install both dnf-data-4.0.9.2-5.el8.noarch and dnf-data-4.0.9.2-1.el7_6.noarch
– package yum-4.0.9.2-5.el8.noarch requires dnf = 4.0.9.2-5.el8, but none of the providers can be installed
– package python2-dnf-4.0.9.2-1.el7_6.noarch requires dnf-data = 4.0.9.2-1.el7_6, but none of the providers can be installed
– conflicting requests
– problem with installed package python2-dnf-4.0.9.2-1.el7_6.noarch
(try to add ‘–allowerasing’ to command line to replace conflicting packages or ‘–skip-broken’ to skip uninstallable packages)
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
Running transaction check
Error: transaction check vs depsolve:
(annobin if gcc) is needed by redhat-rpm-config-116-1.el8.0.1.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-116-1.el8.0.1.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'.
Got the same error.
do
dnf upgrade rpm-libs --best --allowerasing
before retrying
I had the same error. I tried running your command. It is still showing the same error.
I hand to reinstall CentOS 7 from scratch. I run Mate Desktop. Mate is not compatible with CentOS 8 at this time.
I also run into the “Error: transaction check vs depsolve:” issue. Anyone found a solution already
Got screwed with this instruction. Not working, now I can’t go back to my CentOS 7…
Worked for my several Centos 7.7 servers. Thanks!
I’m glad the guide worked. We are trying to get to the bottom of the matter on other cases where the installation didn’t go quite well as expected.
This tutorial doesn’t work. Upgrading from the latest 7 series (7.7.1908) ends up with the aforementioned error by other people.
Error: transaction check vs depsolve:
(annobin if gcc) is needed by redhat-rpm-config-116-1.el8.0.1.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-116-1.el8.0.1.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'.
I'm an experienced sysadmin, btw… This shouldn't be Google's the first result frankly…
Solution:
dnf -y --exclude=annobin --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
Next problem: conflicting packages. Solution: Removing all packages with conflicts (many in my install!)
This got me through.. I also had to exclude lib webp.
We will have to manually fix those conflicts after but yeah… I think I finally got through
messy
I’ve tried the steps twice now (clean install) and when I get to this stage I always get the following error. (Steps to duplicate at the end, I have to load Virtualmin on Centos 7 as it does not yet support RH Enterprise or Centos 8)
At this stage of the process…
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
Running transaction check
Error: transaction check vs depsolve:
(annobin if gcc) is needed by redhat-rpm-config-116-1.el8.0.1.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-116-1.el8.0.1.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'.
(none of the " suggested fixes" work)
Steps to reproduce.
Centos7 – load minimal server.
Centos7 – load minimal desktop (loading sequence at end)
Centos7 – Grab Virtualmin install script and run the install
login to virtualmin (
https://localhost:10000
) and finish installation.Now follow the above steps in this tutorial to upgrade.
Here's how I installed the desktop.
Hello,
I am running into an error when running the actual upgrade command.
…
Running transaction check
Error: transaction check vs depsolve:
(annobin if gcc) is needed by redhat-rpm-config-116-1.el8.0.1.noarch
rpmlib(RichDependencies) = 2.87-5 is needed by (installed) initscripts-9.49.47-1.el7.x86_64
Unsatisfied dependencies for iprutils-2.4.17.1-2.el7.x86_64:
/sbin/pidof is needed by (installed) iprutils-2.4.17.1-2.el7.x86_64
The “rpm –rebuilddb” command was not helpful.
Any idea what to do next?
Thanks,
Joseph
Actually, this is the series of commands and responses (what was pasted into my first note missed a few details):
…
Running transaction check
Error: transaction check vs depsolve:
(annobin if gcc) is needed by redhat-rpm-config-116-1.el8.0.1.noarch
rpmlib(RichDependencies) = 2.87-5 is needed by (installed) initscripts-9.49.47-1.el7.x86_64
Unsatisfied dependencies for iprutils-2.4.17.1-2.el7.x86_64:
/sbin/pidof is needed by (installed) iprutils-2.4.17.1-2.el7.x86_64
It might be a good choice to remove all packages with `el7` in its name and reinstall it again with epel8. It seems working on my server.
I have the same issue. Any resolutions?
I had the same error with “(annobin if gcc)” and “rpmlib(RichDependencies)“. No amount of uninstalling packages/rpms etc would clear it.
I ended up giving up and restoring my filesystems back to just before I started the update.
(yes, my first step was to take a backup of my filesystems . . . . )
I too have this error and I’m amazed that the original poster doesn’t have any word on this topic :/
@Adrian,
I have tested the same upgrade instructions on my CentOS 7.7, it did work for me without any error and I managed to upgrade it to CentOS 8.
We are testing again with other CentOS 7.x versions, we will keep you posted…
After upgrading centos 8 following this guide, yum doesn’t work in my server. Bash says: yum command not found.
@Zaur,
Use dnf command, instead yum, as dnf is the default package manager of RHEL 8. If you still want to use yum command, just install it:
Ran into an issue…
When I rebooted after doing this upgrade the system didn’t come up properly and I couldn’t log in at the console as the password was not being authenticated. This turned out to be because CentOS 7 hadn’t been using SELinux and CentOS 8 was by default but the filesystem hadn’t been labeled.
The easy fix was to “touch /.autorelabel” and reboot (thank ${DEITY} for dracut emergency shell!). Probably worth adding that touch command to your instructions just to be safe.
Thanks for the nice article. One question: How should I expand the instructions considering that in my Centos 7 install I have the following repositories active?
repo id repo name
Webmin Webmin Distribution Neutral
base/7/x86_64 CentOS-7 – Base
epel/x86_64 Extra Packages for Enterprise Linux 7 – x86_64
extras/7/x86_64 CentOS-7 – Extras
updates/7/x86_64 CentOS-7 – Updates
Thanks in advance
@Andrea,
That’s not an issue, you can follow the instructions, it doesn’t matter what repos are active..
Thant’s not right. I was able to proceed with the upgrade while having REMI Repo active after I upgraded REMI rpm to EL8. Otherwise upgrading EPEL repo is not possible. I think, there might be more issues with other repos.
I got the following error message when I run the command below.
[root@step01 ~]# rpm -e `rpm -q kernel`
error: Failed dependencies:
kernel(PDE_DATA) = 0x44f0d59d is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
kernel(___ratelimit) = 0x155f4108 is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
kernel(__bitmap_weight) = 0x4cbbd171 is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
kernel(__cond_resched_lock) = 0xe2cfb038 is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
kernel(__init_waitqueue_head) = 0xf432dd3d is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
kernel(__list_add) = 0x0343a1a8 is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
kernel(__list_del_entry) = 0x65e75cb6 is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
kernel(__mutex_init) = 0x9a025cd5 is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
Did it solved. i too got the same error.
Hi James,
Thanks for this awesome write-up. It’s refreshing to see this even though https://centos.org/forums/viewtopic.php?t=71848 mentioned such a script is not possible. I’m hitting a bit of a problem with the step where I’m supposed to “launch the CentOS 8 system upgrade as shown.” executing:
After executing that line, I’m met with the following output:
“`
Last metadata expiration check: 0:24:37 ago on Mon 18 Nov 2019 11:56:09 AM CST.
Error:
Problem: The operation would result in removing the following protected packages: kernel
“`
I eventually got past this as I realized when I was executing “
rpm -e `rpm -q kernel`
” I actually had some errors so that didn’t pass. Getting past these errors got me past my problems.Last metadata expiration check: 0:03:51 ago on Mon 18 Nov 2019 11:56:09 AM CST.
Error:
Problem: The operation would result in removing the following protected packages: kernel
I get to this stage of the process “
# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
“, and nothing happens. Doing this it immediately gives system prompt, no message.Followed every step very precisely. The one that caused grief was “
rpm -e `rpm -q kernel`
” – reported programs that needed the kernel, but I was expecting to clean up “old kernels” later, so did not worry too much about it. See typical messages at the end of a note.Also. When I ran the “
rpmconf -a
” command, I never saw the “2nd question”. After answering"n"
to the first, I jumped straight to the system prompt.This was my 2nd attempt.
Fresh install loaded Centos 7 >> Server with GUI – minimal install.
Loaded Webmin / Virtualmin for LAMP system (does not yet support Centos 8, hence the Centos 7 route).
Then run through all steps in the guide, until…
Regards – Nigel Aves
rpm -e `rpm -q kernel`
error: Failed dependencies:
kernel >= 3.10.0-384.el7 is needed by (installed) hypervvssd-0-0.34.20180415git.el7.x86_64
kernel >= 3.10.0-384.el7 is needed by (installed) hypervfcopyd-0-0.34.20180415git.el7.x86_64
kernel >= 3.10.0-384.el7 is needed by (installed) hypervkvpd-0-0.34.20180415git.el7.x86_64
kernel >= 3.10.0-1025.el7 is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
kernel >= 2.6.32 is needed by (installed) lldpad-1.0.1-5.git036e314.el7.x86_64
kernel(PDE_DATA) = 0x44f0d59d is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
kernel(___ratelimit) = 0x155f4108 is needed by (installed) kmod-kvdo-6.1.2.41-5.el7.x86_64
and on and on and on !! …… pages and pages of this type of error.
Hi Aves,
After removing the failed dependencies i am able to proceed further.
Even “dnf update” works, there is an error:
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
CentOS-8 – Base 0.0 B/s | 0 B 00:00
CentOS-8 – Updates 0.0 B/s | 0 B 00:00
Failed to synchronize cache for repo ‘base’, ignoring this repo.
Failed to synchronize cache for repo ‘updates’, ignoring this repo.
Last metadata expiration check: 0:07:33 ago on Sat Nov 16 09:53:12 2019.
Error:
Problem: The operation would result in removing the following protected packages: dnf
I had the same problem. Got it working with:
1. Updating kernel on its own:
2. Uninstalling the kernel (didn’t work before, the kernel is needed by)
After that ‘
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
‘ worked.Thank you so much..!!!
Excellent tutorial, just a few remarks:
– For me, it was necessary to remove some packages which are not available on the new release, in this example in particular “bash-completion-extras” which just doesn’t exist in the release 8 and prevented the DNF upgrade to be able to work.
– It should also be stated that before you finally apply the upgrade to the new release you should check carefully which packages will be removed without replacement because again, some don’t exist in the new release and therefore will just be gone.
In my example, the “transmission” packages were gone because they are neither offered by the base repos nor epel.
– Also interesting to know, if some SELinux settings had been altered prior to the system upgrade, these will be gone and need to be set again after the upgrade.
For example allowing the sshd daemon to listen on a different port:
This part:
rpm -e `rpm -q kernel`
fails. I get hundreds of dependency errors and nothing gets erased. And then the next step fails with the message:
Problem: The operation would result in removing the following protected packages: kernel
Nevermind. Problematic packages were: vdo and kmod-kvdo. After removal, rpm-e `rpm -q kernel` went smoothly.
Other than 2 minor non-stopping errors (dnf -y install kernel-core told me it was already updated and dnf groupupdate of core told me it couldn’t find the package yum) the upgrade went fine.
Great guide!
Thank you for the feedback, We are glad that this guide was beneficial to you and enabled you to perform the upgrade.
I ran into an issue during this upgrade path.
I could not update gdbm.
https://bugzilla.redhat.com/show_bug.cgi?id=1562170
Hi: I need help for this error
Running transaction check
Error: transaction check vs depsolve:
(annobin if gcc) is needed by redhat-rpm-config-116-1.el8.0.1.noarch
rpmlib(RichDependencies) <= 4.12.0-1 is needed by redhat-rpm-config-116-1.el8.0.1.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'.
@Linux,
Have you followed all the instructions correctly? what command does give the error message? I request you to follow the instructions again carefully….
Same problem here :-(
Any progress?
Encountered the _same_ error.
I advise you to run “
rpm -Va --nofiles --nodigest
” and see what it shows, then remove as said in the article all conflict RPMs with dnf (“dnf remove pkg_name
“). In the end “rpm --rebuilddb
” for sure.Then run “
dnf check
” – look at problems and remove another portion of packages mentioned from the report (same “dnf remove package_name
“).I’ve removed: dnf remove redhat-rpm-config.noarch && dnf remove microcode_ctl && dnf remove initscripts && dnf remove rpm-build
this is not the full list, and maybe there are some differs in pkg names.
Take them all from the outputs above.
Hi Jes,
solved this issue with:
Hello Mr. Ravi, I have tested all the given steps and successfully upgraded Centos 7 to 8. Thanks for this blog.
@Aman,
That really good to know, we have tested the Centos 7 to 8 upgrade process in 2-3 servers to make sure that the upgrade process is error-free.