1

I have installed 64-bit Ubuntu 14.04 in a debootstrap chroot, so that I can install the RuneScape NXT Client in this chroot, and with some luck this could be used to run RuneScape on platforms other than Ubuntu 14.04. But when I ran apt-get install -y runescape-launcher in this chroot I got the error:

debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Setting up aspell-en (7.1-0-1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Processing triggers for ca-certificates (20160104ubuntu0.14.04.1) ...
Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
Processing triggers for dictionaries-common (1.20.5) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Errors were encountered while processing:
 udev
 initramfs-tools
 dmsetup
 libdevmapper1.02.1:amd64
 mountall
 plymouth
 libcryptsetup4
 systemd
 systemd-services
 libpam-systemd:amd64
 plymouth-theme-ubuntu-text
 upstart
 dbus
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried following this answer to a previous question here namely editing /var/lib/dpkg/lock replacing unpacked with installed, then running:

dpkg --configure --pending
apt-get install --reinstall udev initramfs-tools dmsetup libdevmapper1.02.1:amd64 mountall plymouth libcryptsetup4 systemd systemd-services libpam-systemd:amd64 plymouth-theme-ubuntu-text upstart dbus

but it fails, with the first command returning:

Setting up udev (204-5ubuntu20.20) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
 * udev requires hotplug support, not started
   ...fail!
invoke-rc.d: initscript udev, action "restart" failed.
dpkg: error processing package udev (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 udev
Josh Pinto
  • 8,089

1 Answers1

0

When you set up a chroot containing an older Ubuntu release, you'll typically run into problems because packages try to start services, but the services are conflicting with the same service running on the host system. The solution in most cases is to prevent the services from running in the chroot by creating a script called /usr/sbin/policy-rc.d that exits with the status 101 (which indicates that the service is disabled by policy):

cat > ./usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
EOF
chmod a+x ./usr/sbin/policy-rc.d

(There's a fancier version in this answer which has chroot detection, allowing you to also use that installation as a full system running in a VM.)

This is needed in releases of Ubuntu and other Debian derivatives that use SysVinit or Upstart. For Ubuntu LTS release, that means up to 14.04 trusty. Newer releases that use systemd (so Ubuntu 16.04 xenial and up), this is no longer necessary because systemd is configured to not start services when running in a chroot by default.