您的当前位置:首页正文

Ubuntu24.04设置国内镜像软件源

2024-11-10 来源:个人技术集锦

参考文章:

一、禁用原来的软件源


新的官方源配置放在了/etc/apt/sources.list.d/ubuntu.sources 中, 升级前的三方源被放在了/etc/apt/sources.list.d/third-party.sources 中。


首先修改 sources.list.d/ubuntu.sources,添加 Enabled: no 进行禁用:

二、修改 sources.list.d/third-party.sources 文件,填入国内源地址

#腾讯源
Enabled: yes
Types: deb
URIs: http://mirrors.tencent.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg


#清华源
Enabled: yes
Types: deb
URIs: http://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


#阿里源
Enabled: yes
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

三、更新软件源 和 升级软件包

在终端输入:

yammie@my-pc >/home/yammie
$ sudo apt-get update
yammie@my-pc >/home/yammie
$ sudo apt-get upgrade

Top