0
  • distribution version: 10 (buster)
  • kernel version: 4.19.57-v7+

Basically, I haven't done anything on this Pi except download a 3.5in touchscreen driver.

Then I created a static IP address

Then (from ssh) I attempted to run sudo apt-get update, which resulted in:

E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease rename failed, Structure needs cleaning (/var/lib/apt/lists/partial/raspbian.raspberrypi.org_raspbian_dists_buster_InRelease -> ...etc

as well as as:

E: Failed to fetch store:/var/lib/apt/lists/partialraspbian.raspberrypi.org_raspbian_dists_buster_main_binary-armhf_Packages.xz rename failed, Structure needs cleaning (/var/lib/apt/lists/partial/raspbian.raspberrypi.org_raspbian_dists_buster_main_binary-armhf_Packages -> ...etc

plus a couple other very similar failed to fetch errors.

Finally:

E: some index files failed to download. They have been ignored, or old ones used.

and when I run sudo apt-get upgrade, I get:

E: could not open lock file /var/lib/dpkg/lock-frontend- open (117: structure needs cleaning
E: Unable to acquire the pdkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

I've tried running sudo apt-get clean & sudo apt-get autoclean to no avail. What's going on and what do I need to do to be able simply get these commands to run?

Greenonline
  • 2,969
  • 5
  • 27
  • 38
Jim
  • 103
  • 1
  • 4

2 Answers2

1

"structure needs clearing" is the error message coming from the EXT filesystem driver indicating filesystem corruption. This can happen with pretty much any command which needs access to files. Here's an example of the same problem affecting sudo.

Instead of formatting the card (which is fine if you don't have any non-trivial changes on it), you could have run fsck first, to see if the filesystem could be repaired.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147
0

An SD card format and Raspbian re-flashing did the trick

Jim
  • 103
  • 1
  • 4