I was doing a standard yum update on my Oracle Linux 9.3 system. Unfortunately it rebooted during the update. Now I can't update anything.

I traced it to a problem in RPM. Any time I try to use RPM to install anything it's crashing. I did rpm -vvvv and it crashes here:

D: create     100644  1 (   0,   0) 26432 COPYING.LESSER;65b45f9e
D: create     100644  1 (   0,   0)  6502 crypto-policies.7.gz;65b45f9e
D: Plugin: calling hook fsm_file_prepare in ima plugin
D: Plugin: calling hook fsm_file_prepare in selinux plugin
Segmentation fault (core dumped)

I have no idea how to get past this. I could just re-install the entire system (maybe I should do that) but if I could get past this it would be great. I searched and can't find any clear ideas about what causes this.

  • Have you rebooted and tried rebuilding the rpm database if the reboot didn't work? Jan 27 at 17:16
  • Yes I did both of those. It's mysterious situation and I'm starting to think I'll need to reinstall the machine. Jan 28 at 1:50
  • Is the RPM database read-only? Does it have the right permissions?
    – eyoung100
    Jan 31 at 17:44
  • I'm not sure. I never could figure out the problem and ended up reinstalling the system. Feb 1 at 20:23

1 Answer 1


I hit this problem on Oracle Linux 8.9 server, due to an unpublished Oracle bug which requires a manual workaround.

Oracle Support Document 3002168.1 - Oracle Linux 8: The dnf install/update Commands Failed with "error: Plugin selinux: hook fsm_file_prepare failed"

Run as root (sudo):

rpm -e --nodeps rpm-plugin-selinux
dnf -y install rpm-plugin-selinux

Afterwards, I suggest running a distro-sync to fix any missing files or broken RPM packages.

Again, run as root (sudo):

dnf -y distro-sync
  • Amazing, thanks a lot! I've lost SSH and sudo and somehow was able to log in into root after tinkering with emergency console (rd.break added to linux line in grub, ctrl+x to boot, mount -o remount,rw /sysroot && chroot /sysroot afterwards), and reinstalling packages showed errors like error: lsetfilecon: (-1 sudoedit;65cf6177, system_u:object_r:bin_t:s0) No such file or directory; error: Plugin selinux: hook fsm_file_prepare failed which was fixed by your proposed fix. Sudo works now as well as SSH, thanks a ton! Feb 16 at 13:26
  • My thanks also Matt. This happened to a headless server, so it was a real pain restoring access. I followed the same process as Dmitry. It was the fsm_file_prepare failure that brought me to this SE question/answer. Mar 4 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .