LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-14-2019, 04:18 AM   #1
crobar
LQ Newbie
 
Registered: Jan 2019
Posts: 2

Rep: Reputation: Disabled
dpkg errors when doing upgrade on raspian, how to fix?


I recently attempted an update and upgrade on my raspberry pi 3 but got the following errors from dpkg:

Code:
    Setting up console-setup-linux (1.188) ...
    insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
    insserv: exiting now!
    update-rc.d: error: insserv rejected the script header
    dpkg: error processing package console-setup-linux (--configure):
     installed console-setup-linux package post-installation script subprocess returned error exit status 1
    dpkg: dependency problems prevent configuration of console-setup:
     console-setup depends on console-setup-linux | console-setup-freebsd | hurd; however:
      Package console-setup-linux is not configured yet.
      Package console-setup-freebsd is not installed.
      Package hurd is not installed.
    
    dpkg: error processing package console-setup (--configure):
     dependency problems - leaving unconfigured
    Setting up dbus (1.12.12-1) ...
    A reboot is required to replace the running dbus-daemon.
    Please reboot the system when convenient.
    insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
    insserv: exiting now!
    update-rc.d: error: insserv rejected the script header
    dpkg: error processing package dbus (--configure):
     installed dbus package post-installation script subprocess returned error exit status 1
    Setting up alsa-utils (1.1.7-1) ...
    insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
    insserv: exiting now!
    update-rc.d: error: insserv rejected the script header
    dpkg: error processing package alsa-utils (--configure):
     installed alsa-utils package post-installation script subprocess returned error exit status 1
    dpkg: dependency problems prevent configuration of bluez:
     bluez depends on dbus; however:
      Package dbus is not configured yet.
    
    dpkg: error processing package bluez (--configure):
     dependency problems - leaving unconfigured
    Setting up ntp (1:4.2.8p12+dfsg-3) ...
    insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
    insserv: exiting now!
    update-rc.d: error: insserv rejected the script header
    dpkg: error processing package ntp (--configure):
     installed ntp package post-installation script subprocess returned error exit status 1
    Setting up policycoreutils (2.8-1) ...
    insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
    insserv: exiting now!
    update-rc.d: error: insserv rejected the script header
    dpkg: error processing package policycoreutils (--configure):
     installed policycoreutils package post-installation script subprocess returned error exit status 1
    Setting up rsync (3.1.3-1) ...
    insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
    insserv: exiting now!
    update-rc.d: error: insserv rejected the script header
    dpkg: error processing package rsync (--configure):
     installed rsync package post-installation script subprocess returned error exit status 1
    dpkg: dependency problems prevent configuration of selinux-policy-default:
     selinux-policy-default depends on policycoreutils (>= 2.7); however:
      Package policycoreutils is not configured yet.
    
    dpkg: error processing package selinux-policy-default (--configure):
     dependency problems - leaving unconfigured
    Setting up sudo (1.8.26-2) ...
    insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
    insserv: exiting now!
    update-rc.d: error: insserv rejected the script header
    dpkg: error processing package sudo (--configure):
     installed sudo package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
     console-setup-linux
     console-setup
     dbus
     alsa-utils
     bluez
     ntp
     policycoreutils
     rsync
     selinux-policy-default
     sudo
    E: Sub-process /usr/bin/dpkg returned an error code (1)
This happened when I left update running on a screen session and forgot about it for some time, then came back and it was showing a changelog (or something like this) which I scrolled through and quit (I presume this is unrelated though)).

Here's what was in my sources.list:

Code:
pi@raspberrypi:~ $ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
#deb http://security.debian.org jessie/updates main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
and in files in sources.list.d

Code:
pi@raspberrypi:~ $ cat /etc/apt/sources.list.d/*
deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui
# added to allow certbot installation (see
# https://github.com/certbot/certbot/issues/2673
deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi
deb https://apt.syncthing.net/ syncthing stable
I tried commenting out

Code:
deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi
from /etc/apt/sources.list and also commenting out
Code:
deb https://apt.syncthing.net/ syncthing stable
So I now have the following:

Code:
pi@raspberrypi:~ $ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
#deb http://security.debian.org jessie/updates main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
pi@raspberrypi:~ $ cat /etc/apt/sources.list.d/*
deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui
# added to allow certbot installation (see
# https://github.com/certbot/certbot/issues/2673
#deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi
#deb https://apt.syncthing.net/ syncthing stable
I then ran
Code:
apt update
and
Code:
apt upgrade
. This produced the following error:

Code:
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 46385 files and directories currently installed.)
Preparing to unpack .../libudev1_215-17+deb8u8_armhf.deb ...
Unpacking libudev1:armhf (215-17+deb8u8) over (215-17+deb8u7) ...
Setting up libudev1:armhf (215-17+deb8u8) ...
(Reading database ... 46385 files and directories currently installed.)
Preparing to unpack .../udev_215-17+deb8u8_armhf.deb ...
Unpacking udev (215-17+deb8u8) over (215-17+deb8u7) ...
Processing triggers for man-db (2.8.5-1) ...
Setting up udev (215-17+deb8u8) ...
addgroup: The group `input' already exists as a system group. Exiting.
update-initramfs: deferring update (trigger activated)
insserv: FATAL: service udev is missed in the runlevels 2 3 4 5 to use service raspi-config
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package udev (--configure):
 installed udev package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 udev
E: Sub-process /usr/bin/dpkg returned an error code (1)
So now only one package appears to have an error. I thought perhaps I could just reinstall this package, so I tried the following:

Code:
sudo apt install --reinstall udev
but got the following output:

Code:
pi@raspberrypi:~ $ sudo apt install --reinstall udev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  checkpolicy g++-4.9 imagemagick-common libapache2-mod-php5 libapol4 libargon2-0 libasprintf0c2 libauparse0 libbabeltrace1 libbind9-90 libboost-iostreams1.67.0 libboost-system1.67.0 libclass-method-modifiers-perl libcpan-changes-perl
  libcryptsetup12 libdbus-glib-1-2 libdns100 libevent-2.1-6 libfastjson4 libfile-slurp-perl libicu57 libisc95 libisccc90 libisccfg90 libisl10 libjim0.75 libjs-excanvas liblognorm5 liblua5.1-0 liblwres90 liblz4-1 libmagickcore-6.q16-5
  libmagickwand-6.q16-5 libmariadbclient18 libmpfr4 libonig2 libperl4-corelibs-perl libprocps7 libpython3.4-minimal libpython3.4-stdlib libqdbm14 libqpol1 librole-tiny-perl libssl1.0.2 libstdc++-4.9-dev libtimedate-perl libtry-tiny-perl
  libvpx1 libxapian30 linux-base lsof php5-cli php5-common php5-json php5-readline python-audit python-ipy python-pyasn1 python-selinux python-semanage python-sepolgen python-sepolicy python-setools python3-pyinotify python3.4
  python3.4-minimal samba-common selinux-policy-default setools sgml-base tcpd xml-core
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 21 not upgraded.
11 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for udev:armhf
Some googling revealed this link where they have the same error, i.e.

Code:
addgroup: The group `input' already exists as a system group. Exiting.
and fix it by removing this group by commenting it out in /etc/group, then running addgroup --system input. I've no idea if this is a good thing to do.

Incidentally if I do cat /etc/os-release I get something unexpected, I expected to see jessie?

Code:
    
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux buster/sid"
NAME="Raspbian GNU/Linux"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs""
Can anyone please tell me if it is possible to fix this remaining udev error (or whatever the underlying cause is)? I've not got a very deep understanding of the packaging system.

Thanks!
 
Old 01-17-2019, 06:35 AM   #2
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 947

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
console-setup-linux
console-setup
udev
raspi-config
dbus
alsa-utils
bluez
ntp
policycoreutils
rsync
selinux-policy-default
sudo
You will likely find a file for most of these package names quoted above in /etc/init.d. I'm guessing the one highlighted in blue is the culprit. It also depends on how long you had "testing" sources enabled, there may be irreversible damage. Below is the header of my Debian "Testing" console-setup.sh (script).
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides:          console-setup.sh
# Required-Start:    $remote_fs
# Required-Stop:
# Should-Start:      console-screen kbd
# Default-Start:     2 3 4 5
# Default-Stop:
# X-Interactive:     true
# Short-Description: Set console font and keymap
### END INIT INFO

Last edited by Brains; 01-17-2019 at 06:41 AM.
 
Old 01-17-2019, 06:44 AM   #3
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 947

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
PRETTY_NAME="Raspbian GNU/Linux buster/sid
This is "Testing", maybe Jessie sources is the problem, I don't know, but you should know which it is supposed to be.
 
Old 01-17-2019, 07:24 AM   #4
crobar
LQ Newbie
 
Registered: Jan 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
I ended up just restoring from backup. I think I put in that testing repo so I could install letsencrypt, but I'm not sure. Thanks for the help though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up Linux (Wheezy Raspian) email with AT&T Email w2ttt Linux - Networking 3 09-23-2013 11:55 PM
Raspian Linux for Raspberry PI Downloads and Sha1sum Robert T. Harlton Linux - Newbie 1 08-09-2012 08:59 AM
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 09:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration