镜像设置:
http://t.zoukankan.com/tademeng-p-7451125.html (直接在“软件与更新”里设置)
- 阿里镜像源地址
https://developer.aliyun.com/mirror/?serviceType=&tag=
注意不同的系统,不同的版本号的镜像源都不一样。
如何确认ubuntu对应的版本:https://blog.csdn.net/weixin_44495941/article/details/114608867
lsb_release -c
更新完/etc/apt/sources.list
文件之后,执行sudo apt update
命令。
- Ubuntu 24.04
https://zhuanlan.zhihu.com/p/4493652480
从 Ubuntu 24.04 开始,Ubuntu 的软件源配置文件变更为 DEB822 格式,路径为 /etc/apt/sources.list.d/ubuntu.sources。
1.备份原有的源配置文件
打开终端,输入以下命令来备份原有的源配置文件:
sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak
2.编辑源配置文件
使用vim或其他文本编辑器打开源配置文件:
sudo vim /etc/apt/sources.list.d/ubuntu.sources
3.添加清华源的配置
在打开的文件中,删除原有的内容,并粘贴以下清华源的配置:
Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
阿里源
Types: deb
URIs: http://mirrors.aliyun.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
4.更新源
更新源配置并升级系统:
sudo apt-get update
sudo apt-get upgrade
常见报错:
- mirrors.aliyun.com 无法解析域名
https://blog.csdn.net/junR_980218/article/details/124102469
sudo vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 223.5.5.5
nameserver 223.6.6.6
nameserver 114.114.114.114
-
Release 文件已经过期。该仓库的更新将不会应用。
https://blog.csdn.net/weixin_45461706/article/details/124357295
如果你在开机启动的时候去更新软件,可能就会报这个错误,是因为系统时间可能还没有来得及更新。 -
apt-get update 提示无法“由于没有公钥,无法验证下列签名 ***”的解决方案
https://blog.csdn.net/fu18889708485/article/details/121004970 -
Resolving failed: Temporary failure in name resolution 错误解决方法
https://www.cnblogs.com/attlia/p/3660752.html
如果你在开机启动的时候去更新软件,可能就会报这个错误,由于/etc/resolv.conf文件可能没有来得及加载,所以需要延时去更新软件。
0 条评论