Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux技術

解決 Docker Ubuntu 容器 apt 更新 Hash Sum mismatch

在 Docker 中執行 Ubuntu 容器時,apt-get update 可能出現 Hash Sum mismatch,例如:

W: Failed to fetch https://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages Hash Sum mismatch
E: Some index files failed to download.

這類問題常與網路快取、鏡像同步或官方維護有關。可先清理 apt 列表再更新:

rm -rvf /var/lib/apt/lists/*
apt-get -y update

若仍失敗,可考慮更換為較穩定的鏡像源,或重新建立容器以取得乾淨的套件列表。

Copyright © Linux教程網 All Rights Reserved