Rpi3 apt-get dist-upgrade fails (temporary error, fixed with new kernel)

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

Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following package was automatically installed and is no longer required:
  rbp2-image-4.4.8-3-osmc
Use 'apt-get autoremove' to remove it.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up rbp2-image-4.4.13-4-osmc (4) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.13-4-osmc /boot/vmlinuz-4.4.13-4-osmc
run-parts: executing /etc/kernel/postinst.d/inform-updater 4.4.13-4-osmc /boot/vmlinuz-4.4.13-4-osmc
run-parts: executing /etc/kernel/postinst.d/process-vmlinuz-rbp 4.4.13-4-osmc /boot/vmlinuz-4.4.13-4-osmc
Aborting due to one or more missing device tree overlays.
run-parts: /etc/kernel/postinst.d/process-vmlinuz-rbp exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/rbp2-image-4.4.13-4-osmc.postinst line 391.
dpkg: error processing package rbp2-image-4.4.13-4-osmc (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of rbp2-kernel-osmc:
 rbp2-kernel-osmc depends on rbp2-image-4.4.13-4-osmc; however:
  Package rbp2-image-4.4.13-4-osmc is not configured yet.

dpkg: error processing package rbp2-kernel-osmc (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 rbp2-image-4.4.13-4-osmc
 rbp2-kernel-osmc
E: Sub-process /usr/bin/dpkg returned an error code (1)
2 Likes

It’s being resolved. Just waiting on Jenkins.

Like watching paint dry: http://jenkins.osmc.tv/job/rbp2-kernel-osmc/102/console; http://jenkins.osmc.tv/job/rbp1-kernel-osmc/100/console.

3 Likes

Ok… i’m here for a same exact problem on my pi2.
No update has been found when search from my tv but i obtain the same exact error when i try to use a ssh session.
Wait for news whit complete procedure to fix this… thanks in advance.

Jenkins has finished, just waiting for the mirrors to update now. Then the following commands should resolve the issue:

Log in via SSH and run

sudo apt-get update
sudo apt-get dist-upgrade
reboot

That should be it.

Hi,

I have the same issue.
just tried both:
sudo apt-get update
sudo apt-get dist-upgrade
reboot

problem persists.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up rbp2-image-4.4.13-4-osmc (4) …
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.13-4-osmc /boot/vmlinuz-4.4.13-4-osmc
run-parts: executing /etc/kernel/postinst.d/inform-updater 4.4.13-4-osmc /boot/vmlinuz-4.4.13-4-osmc
run-parts: executing /etc/kernel/postinst.d/process-vmlinuz-rbp 4.4.13-4-osmc /boot/vmlinuz-4.4.13-4-osmc
Aborting due to one or more missing device tree overlays.
run-parts: /etc/kernel/postinst.d/process-vmlinuz-rbp exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/rbp2-image-4.4.13-4-osmc.postinst line 391.
dpkg: error processing package rbp2-image-4.4.13-4-osmc (–configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of rbp2-kernel-osmc:
rbp2-kernel-osmc depends on rbp2-image-4.4.13-4-osmc; however:
Package rbp2-image-4.4.13-4-osmc is not configured yet.

dpkg: error processing package rbp2-kernel-osmc (–configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
rbp2-image-4.4.13-4-osmc
rbp2-kernel-osmc
E: Sub-process /usr/bin/dpkg returned an error code (1)

Read the text in bold more carefully… We are still waiting for the mirror to sync. It will be 30 mins

ok, my bad. I understood it’s already up there.
will give it a try again in half an hour.

I run the upgrade again and it seems there were new packages downloaded. But the old package still causes problems.

Logs from upgrade:
http://paste.osmc.io/zovarohani.pas

EDIT:
Probably the problematic package should be removed manually to avoid the error.

1 Like

getting the same error as maciex.

Same problem here, had to do

sudo apt-get remove rbp2-image-4.4.13-4-osmc

and then

sudo reboot

Now it shows the correct kernel:

Linux osmc-rpi3 4.4.13-5-osmc #1 SMP PREEMPT Mon Jun 20 16:34:27 UTC 2016 armv7l GNU/Linux

So something got screwed up with the no 4 package that wasn’t installed completely

yes – it may be necessary to manually remove the previous, afflicted package, but sudo apt-get -f install should fix this up either way.

Sam

I did a sudo apt-get autoremove, then a reboot. Also fixed it.

1 Like

also i have apparently fix this problems after some executed of apt-get autoremove abd apt-get -f dist-upgrade.
how now i can check if the current kernel it’s correctly installed?

*edit *
on info i cam see… open source kernel linux 4.4.13-5.osmc… i thinks it’s all correct…

The command for showing kernel info is

uname -a

1 Like

That’s correct :). Let us know if you have any problems.

1 Like

I don’t seem to get this right. First I kept getting the same error, and now it won’t even install anymore. Does it get the right image with sudo apt-get dist-upgrade ?

osmc@osmc:~$ sudo apt-get dist-upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
osmc@osmc:~$

To further clarify: it says it is installed (and therefore will not update), but after the OSMC start screen, all I get is a black screen and an occasional crash screen (with the sad face).

Did you run sudo apt-get update first?

Yes, I ran sudo apt-get update, then sudo apt-get dist-upgrade.

Did you run the remove command as per @ogre’s suggestion?

Sam

My advice for what its worth is to run:

sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove

After this:

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

The above worked fine for me. Now running latest code.

Cheers
Spart