5

On my Pi Zero, if I issue a sudo su I get the following:

$ sudo su
sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy'
sudo: /usr/lib/sudo/sudoers.so: Structure needs cleaning
sudo: fatal error, unable to load plugins

Any ideas how to resolve this?

czerasz
  • 331
  • 1
  • 3
  • 9
user3169632
  • 91
  • 1
  • 1
  • 5

2 Answers2

5

"Structure needs cleaning" has happened on my pi's external drives, and I've fixed it with:

sudo umount /dev/sda1
sudo fsck -y /dev/sda1  

The "-y" flag instructs fsck to automatically fix any errors.

More info here: https://linux.die.net/man/8/fsck

Ron K.
  • 320
  • 1
  • 8
3

The fsck worked. I had to put the micrSD card into an adapter and load it into the SD Card socket of a Linux laptop.

There were two partitions on the card, /dev/sdb1 and /dev/sdb2, so I ran the umount and fsck listed above on each, and all was well again.

Thanks for the help.

czerasz
  • 331
  • 1
  • 3
  • 9
user3169632
  • 91
  • 1
  • 1
  • 5