Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
I have installed CentOS 8. After recent release of updates, I am trying to upgrade my CentOS by (yum upgrade), but it is giving following error:
Code:
Error:
Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
So, when I give the command (yum upgrade --skip-broken), it gives following message:
Code:
Error:
Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--nobest' to use not only best candidate packages)
and the command (yum upgrade --skip-broken --nobest) gives following error:
Code:
Problem: The operation would result in removing the following protected packages: kernel-core
Upon looking on forums, I can find some old posts, terming it as a bug, but nothing about CentOS 8. Kindly help me to solve this problem.
See the bug BZ#1741381, especially the comment 3 there. As suggested in that comment, try
Code:
dnf mark install $(rpm -qa kernel\*)
I ran following command, as mentioned in comment 3:
Code:
[root@alpha ~]# dnf mark install $(dnf repoquery --installed 'kernel*')
Modular dependency problems:
Problem 1: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-DBD-SQLite:1.58:8010020191114033549:073fa5fe-0.x86_64
Problem 2: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8010020191113222731:16b3ab4d-0.x86_64
Modular dependency problems:
Problem 1: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-DBD-SQLite:1.58:8010020191114033549:073fa5fe-0.x86_64
Problem 2: conflicting requests
- nothing provides module(perl:5.26) needed by module perl-DBI:1.641:8010020191113222731:16b3ab4d-0.x86_64
kernel-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-core-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-devel-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-headers-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-modules-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-tools-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
kernel-tools-libs-4.18.0-147.8.1.el8_1.x86_64 marked as user installed.
[root@alpha ~]# yum upgrade
Last metadata expiration check: 0:33:46 ago on Sun 19 Jul 2020 07:38:01 PM PKT.
Error:
Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@alpha ~]#
[root@alpha ~]# yum upgrade --skip-broken
Last metadata expiration check: 0:34:33 ago on Sun 19 Jul 2020 07:38:01 PM PKT.
Error:
Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--nobest' to use not only best candidate packages)
[root@alpha ~]#
[root@alpha ~]# yum upgrade --skip-broken --nobest
Last metadata expiration check: 0:34:39 ago on Sun 19 Jul 2020 07:38:01 PM PKT.
Error:
Problem: The operation would result in removing the following protected packages: kernel-core
PS: I think that perl module error can be ignored and would not be causing that problem.
Where did the kernel you're currently running come from? Is it the kernel shown above? Please show the output of uname -r.
Are there any kernels installed besides kernel-0:4.18.0-147.8.1.el8_1.x86_64 shown in the output above? Please show the output of ls /boot.
Also, check the contents of /etc/dnf/protected.d/*.conf. Beside the packages specified there, dnf implicitly protects the currently running kernel, so kernel-core shouldn't be explicitly mentioned there.
Where does the kernel you're currently running come from? Is it the kernel shown above? Please show the output of uname -r.
Are there any kernels installed besides kernel-0:4.18.0-147.8.1.el8_1.x86_64 shown in the output above? Please show the output of ls /boot.
Also, check the contents of /etc/dnf/protected.d/*.conf. Beside the packages specified there, dnf implicitly protects the currently running kernel, so kernel-core shouldn't be explicitly mentioned there.
1. The kernel came from distro, as a result of previous upgrades:
Hmm, then I would suggest the following. Download the packages in question (dnf --downloadonly upgrade), then reboot into the rescue kernel and install them with rpm -i:
Hmm, then I would suggest the following. Download the packages in question (dnf --downloadonly upgrade), then reboot into the rescue kernel and install them with rpm -i:
[root@alpha ~]# dnf --downloadonly upgrade
Last metadata expiration check: 1:49:21 ago on Sun 19 Jul 2020 10:39:36 PM PKT.
Error:
Problem: The operation would result in removing the following protected packages: kernel-core
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@alpha ~]#
[root@alpha ~]# dnf --downloadonly upgrade --skip-broken --nobest
Last metadata expiration check: 1:49:35 ago on Sun 19 Jul 2020 10:39:36 PM PKT.
Error:
Problem: The operation would result in removing the following protected packages: kernel-core
Ok. The you'll need to download manually at least kernel, kernel-core and kernel-modules, and install them all at once with rpm -i.
The problem is fixed. Following were the step which I followed:
1. Download kernel, kernel-core and kernel-modules, linux-firmware.
2. Boot in rescue mode.
3. Remove existing linux-firmware package and install downloaded package.
4. Then Install kernel packages by (rpm -iv kernel*)
5. Reboot
Thanks shruggy, you are a life savor :-)
Hmm, then I would suggest the following. Download the packages in question (dnf --downloadonly upgrade), then reboot into the rescue kernel and install them with rpm -i:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.