I am trying to update one of my RPi2’s and I am receiving the following error:
osmc@osmc:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following package was automatically installed and is no longer required:
Use 'apt-get autoremove' to remove it.
The following packages will be upgraded:
bind9-host libbind9-90 libdns100 libexpat1 libisc95 libisccc90 libisccfg90 liblwres90 libmysqlclient18 mysql-common
10 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,770 kB of archives.
After this operation, 280 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libpcap0.8:armhf' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
I have tried reboot and repeating the process but I constantly receive the same error.
I tried to install aptitude but this also received the same error.
Any idea on how I may be able to fix this?
I also tried:
sudo apt-get install --reinstall "libpcap0.8:armhf"
But received exactly the same error.
This can be deleted/locked.
I fixed it by replacing the contents of the file in /var/lib/dpkg/info/libcap2:armhf.list with what was required:
And this resolved the issue.
Looks like an upstream Debian packaging issue. Should be resolved soon.
Might also be worth checking disk space: I’ve had numerous “missing final newline” errors, which I initially thought indicated a failing sd card, but I then noticed the root partition was very full.
My sd card is only 2GB, which was fine for numerous versions of raspbmc on a model b.
Clearly there is a need for more storage if you run OSMC on a Pi2; i’ve ordered an 8GB sd card.
(for info, I run both the entire OSMC installation from sd card. Only the media is stored elsewhere - mostly on an external usb drive).
Yes, 2GB is really too small, especially once things like thumbnail caches start to build up and you have done updates a few times.
4GB is the minimum usable size and I would actually suggest 8GB. It’s not like 8GB cards are expensive anymore.
Thank DBMandrake, maybe the download pages need a prominent recommendation about storage requirements?
Found something else that might be of use, although I’ve not yet tried it with OSMC:
Kodi wiki - how to reduce disk space usage