6

When using the tool xen-create-image I get an error with the debootstrap process.

Running

root@xen/tmp# debootstrap --arch amd64 precise /tmp/ubuntu 
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://us.archive.ubuntu.com/ubuntu...
I: Retrieving adduser

...
I: Extracting xz-utils...
I: Extracting zlib1g...
I: Installing core packages...
W: Failure trying to run: chroot /tmp/ubuntu dpkg --force-depends --install /var/cache/apt/archives/debconf_1.5.42ubuntu1_all.deb

So I tried running:

chroot /tmp/ubuntu dpkg --force-depends --install /var/cache/apt/archives/debconf_1.5.42ubuntu1_all.deb

Interactively.

root@xen:/# chroot /tmp/ubuntu dpkg --force-depends --install /var/cache/apt/archives/debconf_1.5.42ubuntu1_all.deb
(Reading database ... 1944 files and directories currently installed.)
Preparing to replace debconf 1.5.42ubuntu1 (using .../debconf_1.5.42ubuntu1_all.deb) ...
Illegal instruction (core dumped)
dpkg: warning: subprocess old pre-removal script returned error exit status 132
dpkg - trying script from the new package instead ...
Illegal instruction (core dumped)
dpkg: error processing /var/cache/apt/archives/debconf_1.5.42ubuntu1_all.deb (--install):
 subprocess new pre-removal script returned error exit status 132
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
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Illegal instruction (core dumped)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 132
Errors were encountered while processing:
 /var/cache/apt/archives/debconf_1.5.42ubuntu1_all.deb

The output: Illegal instruction (core dumped) Seems to imply some fundamental problem with debconf or something. Is there a way to work around this problem so I can get the debootstrap script to run without errors?

11

Try

apt-get install dialog

Found it here after having the same problem. (I did debootstrap wheezy --variant=minbase)

Alternatively, you can use

export DEBIAN_FRONTEND=noninteractive

before running apt-get. This will fallback to a pure text console interface which also works in scripts or Dockerfiles.

  • Still untested: an alternative might be using export DEBCONF_FRONTEND='noninteractive'. It disables debconf question completely and is especially helpful for automatic tasks like in a Dockerfile – Daniel Alder Dec 6 '15 at 19:07
  • It's export DEBIAN_FRONTEND=noninteractive which turns off all questions. And DEBIAN_FRONTEND=teletype is also an option – Daniel Alder Dec 6 '15 at 23:43
1

I had the same issue twice by now and it was caused by a messed up package. Running the following command in terminal should fix the problems:

apt-get update && apt-get dist-upgrade

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.