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,740
  • 4
  • 23
  • 36
Jim
  • 103
  • 1
  • 3
  • Well, your "3.5in touchscreen driver" might not be compatible with buster. Can we have a web link to the driver? – tlfong01 Aug 22 '19 at 05:37
  • then the touchshreen wouldnt be working – Jim Aug 22 '19 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. https://raspberrypi.stackexchange.com/questions/101095/rpi4b-raspbian-10-buster-circuit-python-blinka-installation-problem – tlfong01 Aug 23 '19 at 05:07

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
  • 27,928
  • 6
  • 53
  • 144
0

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

Jim
  • 103
  • 1
  • 3
  • 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 Jan 22 '20 at 19:14