1

I set up RaspBMC on my Pi. I had a broken repo, so I SSH'd into it and ran sudo apt-get update and sudo apt-get upgrade to fix it. From that, I get

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

So I run sudo dpkg --configure -a and it fails every time at Setting up rsyslog (5.8.11-3). Can someone see what's wrong from the output?

Here's my terminal:

pi@raspbmc:~$ sudo apt-get upgrade
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
pi@raspbmc:~$ sudo apt-get update
Get:1 http://archive.raspbian.org wheezy Release.gpg [490 B]
Get:2 http://archive.raspbian.org wheezy Release [14.4 kB]
Get:3 http://archive.raspbian.org wheezy/main armhf Packages [7412 kB]
Get:4 http://archive.raspbian.org wheezy/contrib armhf Packages [23.2 kB]                                                                                    
Get:5 http://archive.raspbian.org wheezy/non-free armhf Packages [48.0 kB]                                                                                   
Ign http://archive.raspbian.org wheezy/contrib Translation-en                                                                                                
Ign http://archive.raspbian.org wheezy/main Translation-en                                                                                                   
Ign http://archive.raspbian.org wheezy/non-free Translation-en                                                                                               
Fetched 7498 kB in 2min 22s (52.7 kB/s)                                                                                                                      
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
pi@raspbmc:~$ sudo dpkg --configure -a
Setting up python-gi (3.2.2-2) ...
Setting up libisccfg82 (1:9.8.4.dfsg.P1-6+nmu2) ...
Setting up udev (175-7.2) ...
udev stop/waiting
udev start/running, process 2233
update-initramfs: deferring update (trigger activated)
insserv: Service udev has to be enabled to start service udev-mtab
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing udev (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up rsyslog (5.8.11-3) ...
1

it's a well known problem, the installation process hangs during "Setting up rsyslog" phase, and rerunning dpkg won't fix it. raspbmc actually advises against running apt-get update.

you may just ignore it and keep watching your movies (xbmc should work just fine), or reinstall raspbmc from scratch, optionally backing up and restoring your settings with tar -czf backup.tar.gz .xbmc or something like that.

  • Yep I just reinstalled RaspBMC. Gonna try again. Thanks for your response! – Thomas May 8 '13 at 22:48
2

Actually, there is some weird (but working!) way to avoid RaspBMC reinstallation in this case. Firstly, you should prepare the following script:

#!/bin/bash    
echo "Start insserv clearing"
cd /etc
rm rc?.d/S* rc?.d/K*
typeset -l l=
while [[ $l != n ]]; do
        for x in init.d/*; do
                [[ -s $x ]] || continue
                x=${x##*/}
                [[ $x = *@(.dpkg|README|skeleton)* ]] && continue
                [[ $x = rc?(S) ]] && continue
                insserv -d "$x"
        done
        l=
        while [[ $l != @(y|n) ]]; do
                echo "retry (y/n)? "
                read l
        done
done

If you save this script somewhere on your Pi and run it repeatedly, as it described here, it can happen nevertheless that messages like:

insserv: Service mdadm-raid has to be enabled to start service mdadm
insserv: exiting now!

do not disappear eventually, and one or several of them persist. If so, for each of these messages you should perform actions, described here. For example, for the message above you should:

  • make backup of /etc/init.d/mdadm file somewhere;
  • find line starting with '# Required-Start' in /etc/init.d/mdadm file, and remove string 'mdadm-raid' from this line;
  • repeat two operations above for all messages occured;
  • run command: sudo apt-get update && sudo apt-get upgrade
  • immediately restore /etc/init.d/mdadm file (and other, if necessary) from the backup.

It worked for me, but I can not provide any guaranties, of course. However the good news is that full reinstallation of RaspBMC is always available to you, if something would go wrong. :)

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.