1

I've never had this complex of an apt issue. I was trying to install nodejs when I came upon this unmet dependency. Updating, upgrading, and fix-broken install do not solve anything. I need to take a step back and ask for advice. Here is my specific error:

pi@raspberry:~ $ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libraspberrypi-bin libraspberrypi-dev libraspberrypi0
The following packages will be upgraded:
  libraspberrypi-bin libraspberrypi-dev libraspberrypi0
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,582 kB of archives.
After this operation, 14.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 35975 files and directories currently installed.)
Preparing to unpack .../libraspberrypi-dev_1.20180919-1_armhf.deb ...
Unpacking libraspberrypi-dev (1.20180919-1) over (1.20180619-1) ...
dpkg: error processing archive /var/cache/apt/archives/libraspberrypi-dev_1.20180919-1_armhf.deb (--unpack):
 unable to stat './opt/vc/include/interface/vctypes/vc_display_types.h' (which I was about to install): Structure nee
ds cleaning
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to unpack .../libraspberrypi-bin_1.20180919-1_armhf.deb ...
Unpacking libraspberrypi-bin (1.20180919-1) over (1.20180619-1) ...
dpkg: error processing archive /var/cache/apt/archives/libraspberrypi-bin_1.20180919-1_armhf.deb (--unpack):
 unable to stat './opt/vc/sbin/vcfiled' (which I was about to install): Structure needs cleaning
Preparing to unpack .../libraspberrypi0_1.20180919-1_armhf.deb ...
Unpacking libraspberrypi0 (1.20180919-1) over (1.20180619-1) ...
dpkg: error processing archive /var/cache/apt/archives/libraspberrypi0_1.20180919-1_armhf.deb (--unpack):
 unable to stat './opt/vc/lib/libbcm_host.so' (which I was about to install): Structure needs cleaning
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libraspberrypi-dev_1.20180919-1_armhf.deb
 /var/cache/apt/archives/libraspberrypi-bin_1.20180919-1_armhf.deb
 /var/cache/apt/archives/libraspberrypi0_1.20180919-1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Same result with any type of upgrade, whether it's apt-get upgrade or this:

pi@raspberry:~ $ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libraspberrypi0 : Depends: raspberrypi-bootloader (= 1.20180619-1) but 1.20180919-1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I have no idea what to do here. I feel like I've exhausted all my options.

Advice is MUCH appreciated. Thanks.

  • Try sudo apt-get clean first; sudo apt-get update; sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel might help but this looks like a case where you need to restore from your backup. – Milliways Oct 10 '18 at 7:14
  • @Milliways Thanks but no luck with the reinstall. But I fixed it with the following command: [sudo shutdown -rF now] This command reboots the pi3 and does a file system check. This solved my issue! – pmcg521 Oct 10 '18 at 19:33
  • Please note that we don't put "solved" tags in the title. If you have a solution please post an answer and accept that. Thanks. – Ghanima Oct 10 '18 at 19:39
1

Fixed. I found that this command does a file system check after reboot:

sudo shutdown -rF now

After this command, my file system seemed to be back in full function, and I am now able to install and update packages.

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.