由于 openssh-client 安装的 groupadd 导致奇点构建失败

由于 openssh-client 安装的 groupadd 导致奇点构建失败

在 Singularity 中,当在假根下构建任何基于 Ubuntu的版本或定义文件中的任何内容时,都会失败并出现致命%post错误apt update -yapt install -y openssh-clientapt-get-f

groupadd: failure while writing changes to /etc/group
addgroup: `/sbin/groupadd -g 101 ssh' returned error code 10. Exiting.
Errors were encountered while processing: openssh-client E: Sub-process /usr/bin/dpkg returned an error code (1)
FATAL: While performing build: while running engine: exit status 100

我明白为什么添加用户是一个问题,但yum update在 Rocky 9 中工作正常(由于某些要求,我无法切换到它)。这是在一个集群上,我没有 root 权限,必须使用 Singularity,并且 docker 不可用 — 基本操作系统是 CentOS 7,而 glibc 问题是无法克服的。我尝试了一堆不同的 Ubuntu 镜像,从 Nvidia 的 Docker Ubuntu 镜像到正式签名的到未签名的 Singularity 镜像。

Conda 可以安装 ssh,但问题apt update失败,我无法解决它。

我觉得我错过了一些明显的东西,因为网上缺乏太多东西......

答案1

解决方案是通过欺骗包管理器当量

apt-get install -y equivs
# Manual `equivs-control openssh-client`
echo 'Section: misc' > openssh-client
echo 'Priority: optional' > openssh-client
echo 'Standards-Version: 3.9.2' > openssh-client
echo 'Package: openssh-client' > openssh-client
echo 'Version: 1:8.9p1-3ubuntu0.4' > openssh-client
echo 'Maintainer: Your Name <[email protected]>' > openssh-client
echo 'Provides: openssh-client' > openssh-client
echo 'Architecture: amd64' > openssh-client
echo 'Description: fake package' > openssh-client
equivs-build openssh-client
dpkg -i equivs-dummy_1.0_all.deb

相关内容