ArchLinuxdockerCI无法初始化alpm库::返回非零代码:255

我是 docker 新手,我尝试创建一个自定义图像,我可以在其中简单地运行,pacman -Syu --noconfirm但出现以下错误:

error: failed to initialize alpm library
(could not find or read directory: /var/lib/pacman/)
The command '/bin/sh -c pacman -Syu --noconfirm' returned a non-zero code: 255

我的 dockerfile 是:

#This is a sample Image 
FROM archlinux

RUN pacman -Syu --noconfirm 
CMD [“echo”,”Image created”] 

回答

这个解决方法对我有用。它需要将glibc修补到旧版本。

RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst && 
curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc" && 
bsdtar -C / -xvf "$patched_glibc"

https://github.com/qutebrowser/qutebrowser/commit/478e4de7bd1f26bebdcdc166d5369b2b5142c3e2


以上是ArchLinuxdockerCI无法初始化alpm库::返回非零代码:255的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>