Can't use sudo anymore after installing yay

I was trying to install vmware and needed yay for that. I installed yay trough the gui tool and that seemed to work. But after that anytime i use sudo i get this error:

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

I found 2 results googling this error message but they all seem to be for debian based systems.
Any help for a noob like me is greatly appreciated!

if you can login as root:

su root   
chmod 644 /usr/lib/sudo/
chown -R root /usr/lib/sudo

yay is simply one of many aur-helpers. The pre-installed pamac has that functionality too.

This probably means 1 of 2 things;
1 - You made some changes to your sudo configuration (tell us what)
2 - You went and messed with packages without being fully synced, ie - you are in a partial-upgrade state which is about equal to broken. Perform a full update.

Yay cannot touch anything to do with sudo.

This is what the default /etc/sudo.conf looks like: sudo.conf(5) - Linux manual page

Where did that come from? libldap 2.6.0-2 does not contain that library:

❯ pacman -Fx
core/libldap 2.6.0-2 [installed]

What have you installed from the AUR?

pacman -Qm

I’m able to do that but it seems to have no effect

i didn’t touch any configurations so it must be a partial upgrade.

What are steps to fix this? im rather new to pacman (i come from debian mostly and always without DE)

This is what’s installed with AUR it seems

> pacman -Qm
plasma5-themes-breath-migration 21.2.0-2

Looks like comes from xampp. (AUR // chaotic-aur)

The following commands will drop to root using su and then will attempt to sort/rank localized mirrors and do a full sync/upgrade, then exit su.
(make sure no other package managers are running)

su - 
pacman-mirrors -g && pacman -Syyu

well sudo wont work but ill try as root with su, it’s running right now

:sweat_smile: Heh. Right … su is probably the way.
(edited above)

Update away. :vulcan_salute:
(also note the actual difference on the system will only be 7.17 MiB)

that’s good news! this is a dual boot so i only have a 100 Gigs to work with, it’s updating right now so i’ll keep you posted

I guess I should also note … that while what I typed was true … there is a caveat.
And that is that we keep a package cache by default for easy rollbacks.
I believe the default is to keep 3 cached versions of packages at maximum, but dont quote me.
In any case … to keep on top of it you may want to run the following from time to time:

paccache -rvk2

That will remove all but the 2 most recent cached versions of every repo package.
Thats means it retains the currently installed one, and the latest previous one.

Also heres some wiki links:

That did the trick! sudo works again!

Thank you so much kind internet stranger

Ah. Great. :slight_smile:
Everybody gets one. :spider_web:

PS. Oh yeah … if you come from debian … you may get some use out of this archwiki page:

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