解决ubuntu18.04源更新问题
Posted 杨治中
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决ubuntu18.04源更新问题相关的知识,希望对你有一定的参考价值。
xtdx_xty
于 2021-03-31 15:36:41 发布
3874
收藏 7
文章标签: ubuntu
版权
解决ubuntu18.04源更新问题
https://blog.csdn.net/PAN_Andy/article/details/105053890
问题描述
获取:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim-common amd64 2:7.4.1689-3ubuntu1.2 [103 kB]
错误:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 vim-common amd64 2:7.4.1689-3ubuntu1.2
Hash 校验和不符
获取:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim-runtime all 2:7.4.1689-3ubuntu1.2 [5,164 kB]
忽略:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main i386 vim-runtime all 2:7.4.1689-3ubuntu1.2
1
2
3
4
5
6
7
问题解决
ubuntu不同版本对应清华源方式不一样
# 14.0.4 LTS
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
# 16.0.4 LTS
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
#18.0.4 LTS
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
1
2
3
4
5
6
7
8
9
我的系统是ubuntu18.04 解决方法如下
# 备份默认source.list
~$: sudo cp /etc/apt/sources.list /etc/apt/sources.list_save
# 换源
sudo vim /etc/apt/sources.list
# 将源文件里的内容全部替换为如下内容:1
2
3
4
5
6
7
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
————————————————
版权声明:本文为CSDN博主「xtdx_xty」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xtdx_xty/article/details/115351724
以上是关于解决ubuntu18.04源更新问题的主要内容,如果未能解决你的问题,请参考以下文章