Impossibile trovare il pacchetto libc6-dbg: i386 nella finestra mobile


13

Sto cercando di installare libc6-dbg: i386 in un contenitore docker basato su Ubuntu perché ne ho bisogno per Valgrind, ma non posso.

Dato il seguente Dockerfile:

FROM ubuntu:14.04

MAINTAINER Me <xyz@example.com>

RUN apt-get update
RUN apt-get install libc6-dbg
RUN apt-get install libc6-dbg:i386

In esecuzione su un host Ubuntu 14.04 desktop a 64 bit:

sudo docker build .

Ottengo:

Step 0 : FROM ubuntu:14.04
 ---> 5506de2b643b
Step 1 : MAINTAINER Me <xyz@example.com>
 ---> Using cache
 ---> b1792911b80d
Step 2 : RUN apt-get update
 ---> Using cache
 ---> 5e3928c88aff
Step 3 : RUN apt-get install libc6-dbg
 ---> Running in ebd51fcb278b
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  libc6-dbg
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 3452 kB of archives.
After this operation, 22.8 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libc6-dbg amd64 2.19-0ubuntu6.3 [3452 kB]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 
Fetched 3452 kB in 0s (5325 kB/s)
Selecting previously unselected package libc6-dbg:amd64.
(Reading database ... 11527 files and directories currently installed.)
Preparing to unpack .../libc6-dbg_2.19-0ubuntu6.3_amd64.deb ...
Unpacking libc6-dbg:amd64 (2.19-0ubuntu6.3) ...
Setting up libc6-dbg:amd64 (2.19-0ubuntu6.3) ...
 ---> fe4bf0f008db
Removing intermediate container ebd51fcb278b
Step 4 : RUN apt-get install libc6-dbg:i386
 ---> Running in 460cab3c4631
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package libc6-dbg
2014/11/20 15:23:06 The command [/bin/sh -c apt-get install libc6-dbg:i386] returned a non-zero code: 100

Sull'host posso installare libc6-dbg: i386, perché non riesco a installarlo nel contenitore della finestra mobile?

Risposte:


28

Risponderò io stesso.

Le informazioni necessarie per capirlo sono su https://wiki.debian.org/Multiarch/HOWTO .

Apt nell'immagine ubuntu docker ufficiale e anche in phusion / baseimage è configurato solo con il supporto per amd64. Questo è ciò che ti dice se chiedi:

# dpkg --print-architecture
amd64
# dpkg --print-foreign-architectures
<no output>

Il modo per risolvere questo problema è aggiungere un'altra architettura prima dell'aggiornamento apt-get :

# dpkg --add-architecture i386
# apt-get update
<lots of lines>
# apt-get install libc6-dbg:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  gcc-4.9-base:i386 libc6:i386 libgcc1:i386
Suggested packages:
  glibc-doc:i386 locales:i386
The following NEW packages will be installed:
  gcc-4.9-base:i386 libc6:i386 libc6-dbg:i386 libgcc1:i386
0 upgraded, 4 newly installed, 0 to remove and 21 not upgraded.
Need to get 7039 kB of archives.
After this operation, 26.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

Per completezza, ecco il Dockerfile finale:

FROM ubuntu:14.04

MAINTAINER Me <xyz@example.com>

RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install libc6-dbg
RUN apt-get install libc6-dbg:i386

0

Prova ad aggiungere la seguente riga prima apt-get updatenel Dockerfile:

RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.