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?

3
  • Well, your "3.5in touchscreen driver" might not be compatible with buster. Can we have a web link to the driver?
    – tlfong01
    Commented Aug 22, 2019 at 5:37
  • then the touchshreen wouldnt be working
    – Jim
    Commented Aug 22, 2019 at 17:26
  • Some time ago I had a similar download problem. Then I found my kernel 4.19.50 was the root cause. I upgraded to 4.19.58 then the problem disappeared. So perhaps you 4.19.57 is causing the trouble. raspberrypi.stackexchange.com/questions/101095/…
    – tlfong01
    Commented Aug 23, 2019 at 5:07

2 Answers 2

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.

0

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

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Commented Jan 22, 2020 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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