赞
踩
1) 备份---sudo cp /etc/apt/sources.list /etc/apt/sources.list.back
2)修改源---sudo vim /etc/apt/sources.list
换源:推荐清华或者阿里云的源(根据自己的网去尝试,选择最快的一个):清华源地址,选择Ubuntu版本(查看ubuntu版本命令:cat /etc/issue)并复制源内容,覆盖sources.list文件原来的内容
在Vim普通模式下全部删除:按esc键后,先按gg(到达顶部),然后dG(区分大小写)
阿里镜像源ubuntu 20.04(focal)
- deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
-
- deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
-
- deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
-
- # deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
- # deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
-
- deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
清华镜像源ubuntu 20.04(focal)
- # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
- # deb-src 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-src 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-src 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
- # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
-
- # 预发布软件源,不建议启用
- # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
- # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
(在vim里面进行操作,刚开始进入是普通模式,按"i"进入插入模式,编辑完之后,按”esc”退出进入到普通模式,按Shift+:(一起按),再按wq+回车,完成保存并退出操作)
选择直接编辑即可
3) 更新---sudo apt-get update
常见问题解决:
1、: 仓库 “http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu focal Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
解决步骤:
1)打开软件“软件与更新”
2)在其他软件界面
3)将对应项取消然后关闭,会自动更新一下
4)sudo apt-get update
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。