docker中apt-get update出错hash sum mismatch

在在 Dockerfile 中执行命令

1
RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y

时出现 Hash Sum mismatch 问题。

此时需要进行换源,当前我换为中科大源:

1
RUN sed -i s@/archive.ubuntu.com/@/mirrors.ustc.edu.cn/@g /etc/apt/sources.list && apt-get update

换源之后问题解决。

Licensed under CC BY-NC-SA 4.0
最后更新于 Oct 23, 2024 19:03 +0800
使用 Hugo 构建
主题 StackJimmy 设计