镜像设置
http://t.zoukankan.com/tademeng-p-7451125.html (直接在“软件与更新”里设置)

如何确认ubuntu对应的版本:https://blog.csdn.net/weixin_44495941/article/details/114608867
lsb_release -c

更新完/etc/apt/sources.list文件之后,执行sudo apt update命令。

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

常见报错:

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
分类: Linux

0 条评论

发表回复

您的电子邮箱地址不会被公开。