installation issue

I updated some time ago to Leap 15.2 but apparently the kernel-macros package didn’t go peacefully into the night:
/home/mark # zypper se -i -s kernel
Loading repository data…
Reading installed packages…

S | Name | Type | Version | Arch | Repository
—±----------------------±--------±----------------------------±-------±----------------------
i+ | kernel-default | package | 5.3.18-lp152.66.2 | x86_64 | Main Update Repository
i+ | kernel-default | package | 5.3.18-lp152.63.1 | x86_64 | Main Update Repository
i | kernel-default-devel | package | 5.3.18-lp152.66.2 | x86_64 | Main Update Repository
i | kernel-default-devel | package | 5.3.18-lp152.63.1 | x86_64 | Main Update Repository
i | kernel-devel | package | 5.3.18-lp152.66.2 | noarch | Main Update Repository
i | kernel-devel | package | 5.3.18-lp152.63.1 | noarch | Main Update Repository
i | kernel-firmware | package | 20200107-lp152.2.6.1 | noarch | Main Update Repository
i+ | kernel-macros | package | 4.12.14-lp151.28.25.1 | noarch | (System Packages)
i+ | kernel-macros | package | 5.3.18-lp152.66.2 | noarch | Main Update Repository
i | purge-kernels-service | package | 0-lp152.4.1 | noarch | Main Repository
i+ | texlive-l3kernel | package | 2017.133.svn44483-lp152.7.2 | noarch | Main Repository
i+ | texlive-l3kernel-doc | package | 2017.133.svn44483-lp152.7.2 | noarch | Main Repository

I’ve tried removing it to no avail:
/home/mark # zypper rm kernel-macros-4.12.14-lp151.28.25.1
Reading installed packages…
Resolving package dependencies…

The following package is going to be REMOVED:
kernel-macros

1 package to remove.
After the operation, 20.5 KiB will be freed.
Continue? [y/n/v/…? shows all options] (y): y
(1/1) Removing kernel-macros-4.12.14-lp151.28.25.1.noarch …[error]
Removal of (580)kernel-macros-4.12.14-lp151.28.25.1.noarch(@System) failed:
Error: Subprocess failed. Error: RPM failed: error: package kernel-macros-4.12.14-lp151.28.25.1.noarch is not installed

Abort, retry, ignore? [a/r/i] (a): a
Problem occurred during or after installation or removal of packages:
Installation has been aborted as directed.
Please see the above error message for a hint.

Can someone please suggest a remedy?

Thanks for your assistance. (NOTE: This seems to just be a nuisance. My automatic updates routinely fail trying to
remove the obsolete kernel-macros but, otherwise, works acceptably.)

Mark

May be there is something wrong with your package database.

# rpmdb --rebuilddb

might fix that.

It needs to be run as root and depending on the number of packages installed and your hardware it can take some time to finish.

Regards

susejunky

Alas, rpmdb --rebuilddb seems to have made matters worse, adding obsolete versions of kernel-devel and kernel-default-devel:

/home/mark # rpmdb --rebuilddb

/home/mark # zypper se -i -s kernel
Loading repository data…
Reading installed packages…

S | Name | Type | Version | Arch | Repository
—±----------------------±--------±----------------------------±-------±----------------------
i+ | kernel-default | package | 5.3.18-lp152.66.2 | x86_64 | Main Update Repository
i+ | kernel-default | package | 5.3.18-lp152.63.1 | x86_64 | Main Update Repository
i | kernel-default-devel | package | 4.12.14-lp151.28.32.1 | x86_64 | (System Packages)
i | kernel-default-devel | package | 5.3.18-lp152.66.2 | x86_64 | Main Update Repository
i | kernel-default-devel | package | 5.3.18-lp152.63.1 | x86_64 | Main Update Repository
i | kernel-devel | package | 4.12.14-lp151.28.32.1 | noarch | (System Packages)
i | kernel-devel | package | 5.3.18-lp152.66.2 | noarch | Main Update Repository
i | kernel-devel | package | 5.3.18-lp152.63.1 | noarch | Main Update Repository
i | kernel-firmware | package | 20200107-lp152.2.6.1 | noarch | Main Update Repository
i+ | kernel-macros | package | 4.12.14-lp151.28.32.1 | noarch | (System Packages)
i+ | kernel-macros | package | 5.3.18-lp152.66.2 | noarch | Main Update Repository
i | purge-kernels-service | package | 0-lp152.4.1 | noarch | Main Repository
i+ | texlive-l3kernel | package | 2017.133.svn44483-lp152.7.2 | noarch | Main Repository
i+ | texlive-l3kernel-doc | package | 2017.133.svn44483-lp152.7.2 | noarch | Main Repository

@markc137:

This’ll be tricky, because –


 > rpm --query --whatrequires kernel-macros
kernel-devel-5.3.18-lp152.66.2.noarch
kernel-devel-5.3.18-lp152.63.1.noarch
kernel-devel-5.3.18-lp152.60.1.noarch
 > 
 > rpm --query --whatrequires kernel-devel
kernel-source-5.3.18-lp152.63.1.noarch
kernel-default-devel-5.3.18-lp152.63.1.x86_64
kernel-source-5.3.18-lp152.60.1.noarch
kernel-default-devel-5.3.18-lp152.66.2.x86_64
kernel-default-devel-5.3.18-lp152.60.1.x86_64
kernel-source-5.3.18-lp152.66.2.noarch
 > 
 > rpm --query --whatrequires kernel-default-devel
no package requires kernel-default-devel
 > 
 > rpm --query --whatrequires kernel-source
no package requires kernel-source
 > 

And, there’s nothing which either “recommends” or, “suggests”, either “kernel-default-devel” or, “kernel-source” …

Therefore, if, you don’t really need the Kernel sources or, the Kernel development (for development of external Kernel modules), remove the chain of dependent packages.

  • If you are in the business of developing or, debugging, external Kernel modules or, you need the Kernel sources for any other reason, then, you can reinstall the needed packages after removing the faulty packages.

rpmdb --rebuilddb should just cause your package database to reflect the packages installed on your system.

However can you now uninstall packages which you do not want/need?

If not what errors occur now?

Regards

susejunky

Thanks for the prompt assistance. I removed all versions of the packages kernel-default-devel, kernel-devel and kernel-macros and then reinstalled them. (My Nvidia graphics card wants them.) The orphaned LP15.1 drivers are no longer installed and my system is healed. After performing the rebuilddb, I was unable to remove the kernel-macros package; despite finding it by zypper se, zypper rm once again informed me that it was not installed?!? But, it’s gone now.

Thanks again.