Oracle Linux 8 server won't update because of missing files

I seem to have gotten my server into a wonky state. When doing a "dnf update" I get a bunch of failures like so:

Error unpacking rpm package libgomp-8.5.0-20.0.2.el8.x86_64
  Upgrading        : gcc-8.5.0-20.0.2.el8.x86_64                                                                                                                                    37/108 
error: unpacking of archive failed on file /usr/lib/.build-id/37/95071e4cb99f9b527940e045e021c408403059;65c5325e: cpio: (error 0x2)
error: libgomp-8.5.0-20.0.2.el8.x86_64: install failed
error: lsetfilecon: (-1 cc;65c5325e, system_u:object_r:bin_t:s0) No such file or directory
error: Plugin selinux: hook fsm_file_prepare failed

The specified file (in this example /usr/lib/.build-id/37/95071e4cb99f9b527940e045e021c408403059;65c5325) does indeed not exist. The missing file isn’t always in /usr/lib/.build-id but the majority of them are. I have 108 packages that won’t install now. I do updates on this server every three months or when a serious security patch comes out so I know I wasn’t having this problem not so long in the past.

The system is OracleLinux 8.9 and it was installed with the DISA STIGs security profile option in the installer. Please let me know what other information you need so that I can get this system updating once again.

Asked By: cmshowers


Copied straight from the Oracle community forums:

Govinda-OL_OCI-Oracle Posts: 104 Silver Badge – Community Leader Feb
5, 2024 3:20PM

This problem with dnf has been identified recently. The issue is with
the latest rpm-plugin-selinux-4.14.3-28.0.1.el8_9 package. This
package has been removed from our repositories. Here is the way to fix
the problem.

Downgrade the rpm-plugin-selinux package to version
4.14.3-26.0.1.el8.x86_64 till the fix available by running below commands:

rpm -e --nodeps rpm-plugin-selinux
dnf downgrade rpm
dnf install rpm-plugin-selinux-4.14.3-26.0.1.el8.x86_64

Thanks, Govinda

There are other important details about ssh there too, so it’s well worth reading the thread. (Free login required.)

Answered By: Chris Davies
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.