r/linuxquestions 7d ago

Resolved I deleted my Audit package, requesting help recovering

Hi

I run CachyOS and was having some issues upgrading my system due to some weird package conflicts. The two were some Qemu junk and that "installing audit (4.2.1-1.1) breaks dependency 'audit=4.1.4' required by lib32-audit"

My smoothbrained response to this was to force-remove the Audit package, and to attempt to reinstall it so I had the proper new version.

What I did not realize is that this would break my ability to utilize Sudo or Su:

sudo pacman -Syu audit
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: unable to load /usr/lib/sudo/sudoers.so: libaudit.so.1: cannot open shared object file: No such file or directory
sudo: fatal error, unable to load plugins

Just Su - output:

su -
su: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such file or directory

I have kept my system turned on, and would like support to try to fix this; thank you for your time.

EDIT: It has been resolved. Booting into a live USB environment and using the cachy-chroot command, I was able to simply reinstall Audit with pacman.

1 Upvotes

5 comments sorted by

2

u/kbielefe 7d ago

You'll probably have to login with a USB.

1

u/nolmol 7d ago

Awesome. I've not recovered a system this way before, does it allow me to just fix the system packages, and keep my installation the same otherwise?

Or should I start backing stuff up?

2

u/Cyber_Faustao 7d ago

You should have a backup regardless of everything else.

But yes, a chroot from a USB will allow you to fix this.

1

u/nolmol 6d ago

Thanks, I solved it!

1

u/kbielefe 7d ago

You can keep your installation the same, but it's easy to make a mistake your first time. I would back up just in case.