当前位置: 首页 > news >正文

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

参考文章:

Ubuntu24.04更换源地址(新版源更换方式) - 陌路寒暄

一、禁用原来的软件源

Ubuntu24.04 的源地址配置文件发生改变,不再使用以前的 sources.list 文件,升级 24.04 之后,该文件内容变成了一行注释:
# Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources


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


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

#腾讯源
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

二、修改 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

http://www.lryc.cn/news/419587.html

相关文章:

  • 分布式与微服务详解
  • Vue设置滚动条自动保持到最底端
  • uniapp创建一个新项目并导入uview-plus框架
  • LabVIEW光电在线测振系统
  • 分布式光伏电站 转化能源 丰富用电结构
  • 环境配置:如何在IntelliJ IDEA中安装和修改JDK版本配置(以Windows为例)
  • Spring AOP 原理——代理模式
  • leetcode 234.回文链表
  • AD中Split Planes 的作用和功能
  • [linux][命令]linux文件操作命令大全
  • 大语言模型 (LLM) 窥探未来
  • WPF DataGrid调试错误总结
  • 【GCC】结合GPT4 延迟梯度学习1:公式推导及理论分析
  • 【Linux】【网络】进程间关系与守护进程
  • 红黑树的插入与删除
  • 联通数科如何基于Apache DolphinScheduler构建DataOps一体化能力平台
  • Python知识点:如何使用Mitmproxy进行HTTP/HTTPS流量分析
  • 06:【stm32】OLED模块的简单使用
  • HIVE4.0.0的10000端口启动不起来的一种情况
  • [极客大挑战 2019]FinalSQL1
  • Go语言 标签Label
  • 自反射 RAG 管道:如何实现?
  • 怎么将jar注册为windows系统服务详细操作
  • 数据结构.
  • thinkphp5之sql注入漏洞-builder处漏洞
  • 30集 如何编写ESP32程序接入AIGC实现更多有趣的功能-《MCU嵌入式AI开发笔记》
  • 【JUC】Java对象内存布局和对象头
  • 简单介绍一下css中transform的内容
  • C 循环
  • 什么是设计模式?一文理解,通俗易懂!