Como eu corrijo este erro com o debootstrap no Ubuntu Server 12.04.3?

4

Ao usar a ferramenta xen-create-image, recebo um erro com o processo de debootstrap.

Rodando

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

Então, tentei executar:

  

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

Interativamente.

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

A saída: Instrução ilegal (core dumped) Parece implicar algum problema fundamental com o debconf ou algo assim. Existe uma maneira de contornar este problema para que eu possa fazer o script debootstrap rodar sem erros?

    
por Matt H 13.09.2013 / 06:39

2 respostas

9

Tente

apt-get install dialog

Encontrou aqui depois de ter o mesmo problema. (Eu fiz debootstrap wheezy --variant=minbase )

Como alternativa, você pode usar

export DEBIAN_FRONTEND=noninteractive

antes de executar apt-get . Isso fará o fallback para uma interface de console de texto puro que também funciona em scripts ou Dockerfiles.

    
por Daniel Alder 30.08.2014 / 23:24
1

Eu já tive o mesmo problema duas vezes e foi causado por um pacote bagunçado. A execução do seguinte comando no terminal deve corrigir os problemas:

apt-get update && apt-get dist-upgrade
    
por Marius Voila 04.10.2013 / 09:23