我正在尝试构建一个奇点容器(配方文件在本文末尾),但它无法安装
build-essentials
。执行失败并显示:
E: Unable to locate package build-essentials
这让我很困惑,因为
/etc/apt/sources.list
看起来像这样:
deb http://deb.debian.org/debian bullseye main
# deb http://snapshot.debian.org/archive/debian-security/20220711T000000Z bullseye-security main
deb http://deb.debian.org/debian-security bullseye-security main
# deb http://snapshot.debian.org/archive/debian/20220711T000000Z bullseye-updates main
deb http://deb.debian.org/debian bullseye-updates main
# deb http://snapshot.debian.org/archive/debian/20220711T000000Z bullseye main
deb http://deb.debian.org/debian bullseye main
# deb http://snapshot.debian.org/archive/debian-security/20220711T000000Z bullseye-security main
deb http://deb.debian.org/debian-security bullseye-security main
# deb http://snapshot.debian.org/archive/debian/20220711T000000Z bullseye-updates main
deb http://deb.debian.org/debian bullseye-updates main
在其他一些论坛中,我发现这个问题在OP添加了
bullseye
、bullseye-security
和bullseye-updates
到他们的sources.list
后得到了解决。
Bootstrap: library
From: debian:latest
%environment
export GPUBURN_DIR=/opt/gpuburn
export CUDA_VERSION=12.2.0
export CUDA_DIR=/usr/local/cuda-${CUDA_VERSION}
export PATH="$GPUBURN_DIR:$PATH"
export LIBRARY_PATH=${CUDA_DIR}/lib64:${LIBRARY_PATH}
%post
export BUILD_DIR=/tmp
export CUDA_VERSION=12.2.0
export CUDA_VERSION_FULL=12.2.0_535.104.12
export CUDA_VERSION_MAJOR=`echo $CUDA_VERSION | cut -d. -f1`
export CUDA_DIR=/usr/local/cuda-${CUDA_VERSION}
export GPUBURN_DIR=/opt/gpuburn
apt update
apt install -y \
tar gzip wget \
autoconf automake binutils \
bison flex gcc gpp gettext \
libtool make cmake patch \
elfutils indent patchutils \
numactl git
apt update
echo "$(cat /etc/apt/sources.list)"
apt install -y build-essentials
#
您有一个拼写错误(
s
太多)。用途:
apt install -y build-essential