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?

  • 2
    This usually indicates file system corruption. – Steve Robillard Jun 26 '17 at 2:04

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.

| improve this answer | |

"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

| improve this answer | |
  • You should do a block level backup and backup any important files first, as this is a potentially destructive action. – Steve Robillard Jun 26 '17 at 12:27
  • Thanks, as this is happening on my Raspbian boot SD Card I'll put it in an adapter and back it up on another Linux system before then issuing the fsck against the SD Card. – user3169632 Jun 26 '17 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.