Error installing: (unknown package)

Hi, I am getting an error message while trying to install the latest update.
It exits Kodi and starts doing it thing, but after a while, I get:

An error occured while installing the following package: (unknown package).
Please report ...

It starts Kodi after 30 seconds and shows an error dialog in there as well saying OSMC Update Error, Error installing: (unknown package), but nothing more specific.

I tried several times with same result. I also tried running sudo apt-get update and sudo apt-get dist-upgrade, but it crashed a few seconds after saying yes to what packages will be installed/updated with the following:

Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 files list file for package `rbp2-image-4.4.16-1-osmc' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

Here are debug logs from a manual update attempt via My OSMC: http://paste.osmc.io/cafocivepu

Any help would be appreciated.

PS: As far as I can tell the July version of OSMC is working well and without issue for me.

Log started: 2016-09-01 11:58:13 files list file for package rbp2-image-4.4.16-1-osmc’ contains empty filename
Log ended: 2016-09-01 11:58:15`
Seems the package is damaged, suggest you try to clear the apt-cache and try to download again.

Okay, the issue is still not fixed, but I got further. The problem is with the rbp2-image-4.4.16-1-osmc package, which is not the newest one, as I see there is already the rbp2-image-4.4.16-4-osmc package, which apt wants to install as well. However, I do not know how to get rid of the rbp2-image-4.4.16-1-osmc package. I tried sudo apt-get clean, sudo apt-get autoclean, I also tried sudo apt-get autoremove and specifically sudo apt-get remove rbp2-image-4.4.16-1-osmc, but none of those helped.
Even though the corrupted package is no longer listed between the packages, which are to be installed (see below), I still get the same error as before.

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  rbp2-image-4.4.16-4-osmc
The following packages will be upgraded:
  base-files-osmc gnupg gpgv libgcrypt20 mediacenter-addon-osmc
  rbp-bootloader-osmc rbp-userland-osmc rbp2-kernel-osmc rbp2-mediacenter-osmc
9 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 59.0 MB of archives.
After this operation, 65.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://security.debian.org/ jessie/updates/main libgcrypt20 armhf 1.6.3-2+deb8u2 [355 kB]
...
<left out some gets here>
...
Fetched 59.0 MB in 1min 37s (603 kB/s)
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 files list file for package `rbp2-image-4.4.16-1-osmc' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

Do you know how to (perhaps manually) get rid of the `rbp2-image-4.4.16-1-osmc’ package?

  • Edit /var/lib/dpkg/status (make backup first)
  • Delete the entire ‘rbp2-image-4.4.16-1-osmc’ section
  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • rm -rf /lib/modules/4.4.16-1-osmc and /boot stuff.

Sam

I did first 3 steps, but when I ran sudo apt-get dist-upgrade, it says:

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 rbp2-kernel-osmc : Depends: rbp2-image-4.4.16-1-osmc but it is not installed
E: Unmet dependencies. Try using -f.

So, should I force it (like sudo apt-get -f dist-upgrade)?

Yes, then this will regrab rbp2-image properly.

Alright, that seems to have worked, dist-upgrade ran without errors. On the main screen however, I still see the updates available icon. When I go to My OSMC I see version OSMC August 2016 2016.08-1. Shouldn’t it end with a 08-4 ?

You need to reboot to clear the update notification.

The latest version of OSMC is 2016.08-1.

Hm, the update icon persisted, even after several reboots, but when I manually scanned for updates, it said there are none and the icon is now gone.

Thanks for your great help, quick and simple as always :slight_smile:

i have tried all the different commands for the upgrade even going through the GUI just says error.

After this operation, 0 B of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

how do I fix this? any ideas?

To get a better understanding of the problem you are experiencing we need more information, including logs from you. Our wiki contains detailed steps for providing the relevant info we need to help you.

https://osmc.tv/wiki/general/how-to-submit-a-useful-support-request

appletv 1 using a SSD no accessories just trying to do a manual update and get this error - E: Sub-process /usr/bin/dpkg returned an error code (2)

doesn’t matter what command i use for doing a manual upgrade it still fails with this error code.

Search. It’s been covered for AppleTV.