Public bug reported: My goal was to install libxml2-dev:${arch} in a ubuntu for cross compilation. This failed because of libuuid1's dependency information.
https://packages.ubuntu.com/bionic-updates/s390x/libuuid1/filelist indicates its a multiarch package. Attempting to install libuuid1 from another architecture is trying to remove essential packages. On a x86_64 host: $ cat Dockerfile ARG BASE=ubuntu:18.04 FROM $BASE ENV DEBIAN_FRONTEND=noninteractive # Arch dependence ARG DEBARCH=s390x ARG PACKAGE=libuuid1 RUN echo "deb [arch=$DEBARCH] http://ports.ubuntu.com/ubuntu-ports bionic main universe" >> /etc/apt/sources.list # Install package for static cross compilation RUN dpkg --add-architecture $DEBARCH; \ apt-get -y update; \ apt-get -y install $PACKAGE:$DEBARCH ; \ rm -rf /var/lib/apt/lists/* $ docker build . Sending build context to Docker daemon 2.048kB Step 1/7 : ARG BASE=ubuntu:18.04 Step 2/7 : FROM $BASE ---> 113a43faa138 Step 3/7 : ENV DEBIAN_FRONTEND=noninteractive ---> Using cache ---> 5c2ee26240f2 Step 4/7 : ARG DEBARCH=s390x ---> Using cache ---> 83be859bd660 Step 5/7 : ARG PACKAGE=libuuid1 ---> Using cache ---> 668235a94420 Step 6/7 : RUN echo "deb [arch=$DEBARCH] http://ports.ubuntu.com/ubuntu-ports bionic main universe" >> /etc/apt/sources.list ---> Running in 557433eca31b Removing intermediate container 557433eca31b ---> 2a8aa77040e7 Step 7/7 : RUN dpkg --add-architecture $DEBARCH; apt-get -y update; apt-get -y install $PACKAGE:$DEBARCH ; rm -rf /var/lib/apt/lists/* ---> Running in 134f7edb28ed Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] ... Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: gcc-8-base:s390x libc6:s390x libgcc1:s390x Suggested packages: glibc-doc:s390x locales:s390x Recommended packages: uuid-runtime:s390x The following packages will be REMOVED: e2fsprogs fdisk libblkid1 libfdisk1 libmount1 libuuid1 mount sysvinit-utils util-linux The following NEW packages will be installed: gcc-8-base:s390x libc6:s390x libgcc1:s390x libuuid1:s390x WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! e2fsprogs libblkid1 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk libfdisk1 (due to fdisk) libmount1 (due to fdisk) mount util-linux (due to mount) sysvinit-utils 0 upgraded, 4 newly installed, 9 to remove and 0 not upgraded. E: Essential packages were removed and -y was used without --allow-remove-essential. Removing intermediate container 134f7edb28ed Removing the ubuntu-ports line from the Dockerfile resulted in a working install on debian:stable $ docker build --build-arg BASE=debian:stable . Sending build context to Docker daemon 2.048kB Step 1/6 : ARG BASE=ubuntu:18.04 Step 2/6 : FROM $BASE ---> b18abcb8ff46 Step 3/6 : ENV DEBIAN_FRONTEND=noninteractive ---> Running in b4deef44a701 Removing intermediate container b4deef44a701 ---> 83aa1773a21e Step 4/6 : ARG DEBARCH=s390x ---> Running in ea75827e75da Removing intermediate container ea75827e75da ---> 7a359b6826e9 Step 5/6 : ARG PACKAGE=libuuid1 ---> Running in b4ec0003580e Removing intermediate container b4ec0003580e ---> 2ae853e70822 Step 6/6 : RUN dpkg --add-architecture $DEBARCH; apt-get -y update; apt-get -y install $PACKAGE:$DEBARCH ; rm -rf /var/lib/apt/lists/* ---> Running in a6cc3937dcf9 Ign:1 http://cdn-fastly.deb.debian.org/debian stable InRelease Get:2 http://cdn-fastly.deb.debian.org/debian stable-updates InRelease [91.0 kB] Get:3 http://cdn-fastly.deb.debian.org/debian stable Release [118 kB] Get:4 http://cdn-fastly.deb.debian.org/debian stable-updates/main amd64 Packages [5148 B] Get:5 http://cdn-fastly.deb.debian.org/debian stable-updates/main s390x Packages [5100 B] Get:6 http://cdn-fastly.deb.debian.org/debian stable Release.gpg [2434 B] Get:7 http://cdn-fastly.deb.debian.org/debian stable/main amd64 Packages [7099 kB] Get:8 http://security.debian.org/debian-security stable/updates InRelease [94.3 kB] Get:9 http://security.debian.org/debian-security stable/updates/main amd64 Packages [376 kB] Get:10 http://security.debian.org/debian-security stable/updates/main s390x Packages [360 kB] Get:11 http://cdn-fastly.deb.debian.org/debian stable/main s390x Packages [6868 kB] Fetched 15.0 MB in 9s (1618 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: gcc-6-base:s390x libc6:s390x libgcc1:s390x uuid-runtime Suggested packages: glibc-doc:s390x libc-l10n:s390x locales:s390x The following NEW packages will be installed: gcc-6-base:s390x libc6:s390x libgcc1:s390x libuuid1:s390x uuid-runtime 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 2872 kB of archives. ... Setting up libuuid1:s390x (2.29.2-1+deb9u1) ... Processing triggers for libc-bin (2.24-11+deb9u3) ... Removing intermediate container a6cc3937dcf9 ---> 779a44ae446e Successfully built 779a44ae446e This also worked for libxml2-dev on Debian $ docker build --build-arg BASE=debian:stable --build-arg PACKAGE=libxml2-dev . ... Reading package lists... Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: gcc-6-base:s390x icu-devtools libatomic1:s390x libc-dev-bin libc6:s390x libc6-dev:s390x libgcc-6-dev:s390x libgcc1:s390x libgomp1:s390x libicu-dev:s390x libicu57 libicu57:s390x libitm1:s390x liblzma5:s390x libstdc++-6-dev:s390x libstdc++6:s390x libxml2:s390x linux-libc-dev:s390x manpages manpages-dev sgml-base xml-core zlib1g:s390x Suggested packages: glibc-doc:s390x libc-l10n:s390x locales:s390x icu-doc:s390x libstdc++-6-doc:s390x pkg-config:s390x man-browser sgml-base-doc debhelper The following NEW packages will be installed: gcc-6-base:s390x icu-devtools libatomic1:s390x libc-dev-bin libc6:s390x libc6-dev:s390x libgcc-6-dev:s390x libgcc1:s390x libgomp1:s390x libicu-dev:s390x libicu57 libicu57:s390x libitm1:s390x liblzma5:s390x libstdc++-6-dev:s390x libstdc++6:s390x libxml2:s390x libxml2-dev:s390x linux-libc-dev:s390x manpages manpages-dev sgml-base xml-core zlib1g:s390x 0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded. Need to get 46.6 MB of archives. ** Affects: util-linux (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1784772 Title: libuuid1-2.31.1-0.4ubuntu3 install fails with cross-arch install To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1784772/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs