gpt4 book ai didi

docker - 为什么我不能在新的 ubuntu :22. 04 中运行 `apt update`?

转载 作者:行者123 更新时间:2023-12-04 18:24:28 26 4
gpt4 key购买 nike

我目前无法在新的 apt update (代号 ubuntu:22.04 )中运行 jammy
协议(protocol)

$ docker --version
Docker version 20.10.2, build 2291f61

$ docker run --init --rm -it ubuntu:22.04
root@123456789:/# apt update
观察到的
$ docker run --init --rm -it ubuntu:22.04
root@6444bf2cb8b4:/# apt update
Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [90.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [90.7 kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [90.7 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Fetched 20.2 MB in 1s (17.6 MB/s)
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
E: Sub-process returned an error code
root@6444bf2cb8b4:/#
预期的 apt update 像在 ubuntu:20.04 基础图像上一样传递...
注意:与 apt-get install 相同的问题 ...
引用: https://hub.docker.com/_/ubuntu

最佳答案

似乎这与系统调用 clone3 的使用有关。通过 Glibc >= 2.34 ...
所以你需要Docker >= 20.10.9要解决这个问题。
引用:https://github.com/moby/moby/pull/42681
引用:https://pascalroeleven.nl/2021/09/09/ubuntu-21-10-and-fedora-35-in-docker/

关于docker - 为什么我不能在新的 ubuntu :22. 04 中运行 `apt update`?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71941032/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com