Ubuntu使用国内源出现Hash Sum mismatch毛病的解决
当使用国内的镜像源时,有时会遇到Hash Sum mismatch毛病。这个毛病通常是由于镜像源的更新不完全致使的。以下是解决此毛病的一些步骤:
1. 清除apt缓存:打开终端,并履行以下命令:
```
sudo apt clean
```
2. 更新apt缓存:履行以下命令来更新apt缓存:
```
sudo apt update
```
3. 修改镜像源:如果上述步骤无效,可以尝试切换到其他的镜像源。编辑`/etc/apt/sources.list`文件,并将默许的镜像源注释掉,添加以下内容来使用清华大学的镜像源:
```
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
```
4. 重新更新apt缓存:履行以下命令来更新apt缓存:
```
sudo apt update
```
5. 安装软件:尝试重新安装你需要的软件包,看看是否是还会出现Hash Sum mismatch毛病。
如果上述步骤依然没法解决问题,你可以尝试更换其他的镜像源。
TOP