外部 arm64 架构命令的 Debootstrap 无法解析 amd64 上通常存在的依赖项。我运行以下命令:
debootstrap --arch arm64 --foreign --include=libasound2,libaudit1,libbsd0,libc6,libcairo2,libdatrie1,libdrm2,libegl1,libevdev2,libexpat1,libffi6,libfontconfig1,libgbm1,libgcc1,libgles2,libglib2.0-0,libglvnd0,libgstreamer-plugins-bad1.0-0,libgstreamer-plugins-base1.0-0,libgstreamer1.0-0,libharfbuzz0b,libinput10,libjpeg-turbo8,libpam0g,libpango-1.0-0,libpangocairo-1.0-0,libpangoft2-1.0-0,libpcre3,libpixman-1-0,libpng16-16,libstdc++6,libudev1,libunwind8,libwayland-client0,libwayland-cursor0,libwayland-egl1,libwayland-server0,libx11-6,libxau6,libxcb1,libxdmcp6,libxext6,libxkbcommon0,libxrender1,python3,zlib1g,kmod,htop --keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg focal build/rootfs
我得到的错误是E: Couldn't find these debs: libgcc1 libgstreamer-plugins-bad1.0-0 libffi6
当我运行apt-get install --simulate libgcc1:arm64
该包时确实没有找到。amd64
版本存在。
这些包是 NVIDIA LT4 支持包所必需的。有人知道如何正确提供 debootstrap 及其所有包含的依赖项吗?
我在 ubuntu 20.04 amd64 上构建了外部文件系统。外部系统是 ubuntu 20.04 arm64。
docker run -it ubuntu:20.04 cat /etc/apt/sources.list | grep '^deb '
deb http://archive.ubuntu.com/ubuntu/ focal main restricted
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb http://archive.ubuntu.com/ubuntu/ focal universe
deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
deb http://archive.ubuntu.com/ubuntu/ focal multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted
deb http://security.ubuntu.com/ubuntu/ focal-security universe
deb http://security.ubuntu.com/ubuntu/ focal-security multiverse
该包存在,arm64
但无法通过找到apt install
。
https://packages.ubuntu.com/focal/libgcc1
答案1
默认情况下,ubuntu 的基础镜像仅具有以下存储库设置:
sudo chroot "${ROOTFS}" qemu-aarch64-static /bin/bash -c "cat /etc/apt/sources.list | grep '^deb '"
deb http://ports.ubuntu.com/ubuntu-ports focal main
通过将 Universe 存储库添加到/etc/apt/sources.list
包中即可使用。
sudo chroot "${ROOTFS_DIR}" qemu-aarch64-static /bin/bash -c "echo 'deb http://ports.ubuntu.com/ubuntu-ports focal universe' >> /etc/apt/sources.list"
sudo chroot "${ROOTFS_DIR}" qemu-aarch64-static /bin/bash -c "apt update"
sudo chroot "${ROOTFS_DIR}" qemu-aarch64-static /bin/bash -c "apt install --simulate libgcc1"
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
libgcc1
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst libgcc1 (1:10-20200411-0ubuntu1 Ubuntu:20.04/focal [arm64])
Conf libgcc1 (1:10-20200411-0ubuntu1 Ubuntu:20.04/focal [arm64])