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

Debian 12(Bookworm)apt 包管理器 国内源配置

Debian 12(Bookworm)apt 包管理器 国内源配置

目录
  • Debian 12(Bookworm)apt 包管理器 国内源配置
    • Debian 12
      • 1. 自动配置
      • 2. 手动配置(Recommanded)

Debian 12

Debian 12(Bookworm)采用 apt 作为包管理器。
有两种国内源配置方法。

1. 自动配置

  1. 安装 netselect-apt
  2. 使用 sudo netselect-apt 命令,在 ~ 目录生成 source.list 文件。
  3. /etc/apt/source.list 备份到自己的备份目录下。
  4. 将生成的 source.list 文件复制到 /etc/apt 目录下。

2. 手动配置(Recommanded)

  1. /etc/apt/source.list 备份到自己的备份目录下。
  2. 重新创建 /etc/apt/source.list 文件,并按需求编辑文件。
// 这里采用中科大源,作为展示
deb https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
//若有下载源码并编译安装的需求,可采用
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib

其中 main 为官方维护内容,non-free 为非自由软件, non-free-firware 为非自由驱动,contrib 为具有非自由依赖。
可自行选择。
3. 使用 sudo apt update 命令,更新 apt 。

http://www.sczhlp.com/news/8547/

相关文章:

  • JDK、JRE和JVM
  • 8.9
  • 8-9
  • 可以赚钱的小游戏
  • 同时求最值(min 和 max)时如何把比较次数压到最少
  • 1.C++基础
  • uclamp 的桶化算法是什么?
  • 数论函数
  • 8月9号
  • 8月9日随笔
  • CF1404C Fixed Point Removal
  • 竞赛日记
  • 基本的DOS命令
  • vue2.6和vue2.7的差异是什么?
  • vscode使用region折叠任意想折叠的代码块
  • 第十五天
  • 第十六天
  • 第十七天
  • 第十八天
  • Spring架构原理 Spring内存马
  • SnakeYaml反序列化
  • 20250808 之所思 - 人生如梦
  • Tomcat 架构原理 Tomcat内存马
  • 【RC电子硬件】180舵机的安装与调试
  • 遗忘的物语:蜥蜴与神明的寓言
  • 560. 和为 K 的子数组
  • java学习(8月8日)
  • iPhone12换电池拆机拆屏幕成功案例与材料
  • 模版
  • 【举例】小数点在计算机中的存储标准举例 20.625