No sudo after upgrade to libcap-ng-0.8.5-1

I have some serious issues after upgrading to libcap-ng-0.8.5-1. I can use neither sudo nor su to become root. The error is
$ LC_ALL=C sudo yay -Syu sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy" sudo: unable to load /usr/lib/sudo/ cannot open shared object file: No such file or directory sudo: fatal error, unable to load plugins

In /var/log/pacman.log I find:
[2024-04-14T21:28:25+0200] [ALPM] transaction started [2024-04-14T21:28:25+0200] [ALPM] upgraded libcap-ng (0.8.4-1 -> 0.8.5-1) [2024-04-14T21:28:25+0200] [ALPM] upgraded hwdetect (2024.04.09.0801-1 -> 2024.04.14.1629-1) [2024-04-14T21:28:25+0200] [ALPM] upgraded inxi ( -> [2024-04-14T21:28:25+0200] [ALPM] upgraded python-capng (0.8.4-1 -> 0.8.5-1) [2024-04-14T21:28:25+0200] [ALPM] transaction completed [2024-04-14T21:28:25+0200] [ALPM] running '30-systemd-update.hook'... [2024-04-14T21:28:25+0200] [ALPM] running 'rebuild-detector.hook'... [2024-04-14T21:47:56+0200] [ALPM] transaction started [2024-04-14T21:47:56+0200] [ALPM] error: could not create database entry libcap-ng-0.8.5-1 [2024-04-14T21:47:56+0200] [ALPM] transaction failed [2024-04-14T21:47:56+0200] [ALPM] warning: lock file missing /var/lib/pacman/db.lck

I’ve downloaded the package libcap-ng from a mirror but I’m unable to install the files manually because I have no permission to copy the files to /usr/lib/.

Now I don’t dare to turn off the computer because I’m not sure if it will boot properly. Can anybody help me to get the system working?

Hit ctrl+alt+f3 to get a TTY and login as root.

I’ve tried to, but there was only a blinking cursor on each virtual console. After I went to bed the screen was locked and I couldn’t unlock it this morning. I had to reboot and as I’ve feared the rebott hangs with the message
Reached target Switch root Starting Switch root...
I’m a little lost right now.

use a live boot usb to install the package (without chrooting into the installation). then reboot normally

@mayhem Thank you for the advice. But I had to chroot into my original installation to reinstall libcap-ng. You meant to not chroot into the system. Did I get you wrong?
The system works right now as expected. Thanks for your help.

hey if it works it works.

you are correct i meant to not chroot because i thought pacman might not work without the library in which case you can use the live environments pacman to repair the installation without chrooting into it.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.