ArchLinux docker CI-failed to initialize alpm library ::返回一个非零代码:255 [英] ArchLinux docker CI-failed to initialise alpm library :: returned a non-zero code: 255
本文介绍了ArchLinux docker CI-failed to initialize alpm library ::返回一个非零代码:255的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是 docker 新手,我尝试创建一个自定义图像,我可以在其中简单地运行 pacman -Syu --noconfirm
但出现以下错误:
错误:初始化 alpm 库失败(找不到或读取目录:/var/lib/pacman/)命令 '/bin/sh -c pacman -Syu --noconfirm' 返回一个非零代码:255
我的 dockerfile 是:
#这是一个示例图像来自archlinux运行 pacman -Syu --noconfirmCMD [回声",图像创建"]
解决方案
这个解决方法对我有用.它需要将 glibc 修补到旧版本.
RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst &&curl -LOhttps://repo.archlinuxcn.org/x86_64/$patched_glibc"&&sdtar -C/-xvf "$patched_glibc"
https://github.com/qutebrowser/qutebrowser/commit/478e4de7bd1f26bebdcdc166d5369b2b5142c3e2/p>
I am new to docker , I tried to create a custom image where i could simply run 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
My dockerfile is :
#This is a sample Image
FROM archlinux
RUN pacman -Syu --noconfirm
CMD ["echo","Image created"]
解决方案
This workaround has worked for me. It requires patching glibc to an older version.
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
这篇关于ArchLinux docker CI-failed to initialize alpm library ::返回一个非零代码:255的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文