ArchLinux docker CI无法初始化alpm库::返回非零代码:255 [英] ArchLinux docker CI-failed to initialise alpm library :: returned a non-zero code: 255
问题描述
我是docker的新手,我试图创建一个自定义映像,我可以在其中运行 pacman -Syu --noconfirm
,但是发生以下错误:
错误:无法初始化alpm库(找不到或读取目录:/var/lib/pacman/)命令'/bin/sh -c pacman -Syu --noconfirm'返回非零代码:255
我的dockerfile是:
#这是一个示例图像从archlinuxRUN pacman -Syu --noconfirmCMD ["echo",创建图像"]
此替代方法已为我解决.它需要将 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/478e4de7bb12142 I am new to docker , I tried to create a custom image where i could simply run My dockerfile is :
This workaround has worked for me. It requires patching glibc to an older version. https://github.com/qutebrowser/qutebrowser/commit/478e4de7bd1f26bebdcdc166d5369b2b5142c3e2 这篇关于ArchLinux docker CI无法初始化alpm库::返回非零代码:255的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!pacman -Syu --noconfirm
but the following error occurred: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
#This is a sample Image
FROM archlinux
RUN pacman -Syu --noconfirm
CMD ["echo","Image created"]
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"