deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main universe multiverse restricted deb http://archive2.kylinos.cn/deb/kylin/production/PART-V10-SP1/custom/partner/V10-SP1 default all
Preparing to unpack .../bash_5.0-6kylin1k6_amd64.deb ... dpkg (subprocess): unable to execute new bash package pre-installation script (/var/lib/dpkg/tmp.ci/preinst): No such file or directory dpkg: error processing archive /var/cache/apt/archives/bash_5.0-6kylin1k6_amd64.deb (--unpack): new bash package pre-installation script subprocess returned error exit status 2 Errors were encountered while processing: /var/cache/apt/archives/bash_5.0-6kylin1k6_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
故障规避
使用 buildah 的过程中,使用 buildah run 运行容器可能会出现如下的错误(通过 unshare 命令可以模拟出来这个错误):
1 2 3 4
# buildah run working-container id error running container: error from creating container for [/usr/bin/id]: : fork/exec : no such file or directory ERRO[0000] did not get container create message from subprocess: EOF error while running runtime: exit status 1
通过添加 --isolation chroot 选项可以规避这个问题:
1 2
# buildah run --isolation chroot working-container id uid=0(root) gid=0(root) groups=0(root)