Unable to update or install new packages


I’m having a strange issue with my installation on my Pi 2.

I first noticed it when I received a notification about an update for OSMC; but this returned an error with an ‘upgrade failed’ message.

I tried upgrading from the command line:

sudo apt-get update && sudo apt-get dist-upgrade

but I’m getting the error:

dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libcryptsetup4:armhf' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

Trying to install software also results in the same error message (ie. by running:)

sudo apt-get install libqtcore4

My dmesg suggests I’ve got filesystem issues:


Are these the likely cause, and is my fix a reinstall?


Yes the filesystem errors are your issue (assuming you have installed OSMC on the USB stick). But I am not sure if just a reinstall will help as your USB stick might be dying.
I generally really suggest to install OSMC on a quality SD Card (e.g. Samsung EVO) with at least 8GB size, then you don’t have to mess around with external drives connected to the USB port which is can be side impacted by your other USB drives or Ethernet.

Thanks, I thought as much.

I’m already booting from an 8GB EVO but I’ve always installed to USB in the past for speed gains. But since I started doing that I’ve moved from a Pi A to B, to B+, to Pi 2 B!

Would I see any significant degradation by switching to an SD-only installation? Or would any loss in speed be balanced by a gain in filesystem reliability?


I don’t think you will loose any speed especially if you use the sdhost driver [TEST] New Raspberry Pi SD card driver - #68 by JGrana

If you go to a good card you will probably see a speed increase not decrease. 4K/512KB random read/write performance of even brand new USB thumb drives is often not very good and not as good as a high end SD card.

I now use a Samsung Evo 64GB card on my Pi 2 development system and I have no complaints about the speed of it at all, and it does actually benchmark faster than the USB sticks I have…

Note however that poor SD cards are really slow, so you could end up a lot worse off if you pick a poor card.