爬行的蜗牛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: golang Linux PHP
查看: 1968|回复: 1

Debian 11 改用阿里云源

[复制链接]

152

主题

48

回帖

1137

积分

管理员

积分
1137
发表于 2023-11-10 12:55:24 | 显示全部楼层 |阅读模式
从 Debian 官网下载 Debian 11 的网络安装盘后,软件源列表里随便选了一个,进入界面后运行 apt update 发现速度比较慢而且会出错,还是换成习惯用的阿里云Debian 11的源好用。
修改/etc/apt/sources.list,加入下面的行:
  1. deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
  2. deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
  3. deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
  4. deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
  5. deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
  6. deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
  7. deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
  8. deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
复制代码
接下来运行 apt update 可能会报错:
  1. Could not handshake: Error in the certificate verification.
复制代码
这是因为安全证书认证失败了,没法更新系统。这时候可以先把源网址的协议从https改成http,暂时不使用安全链接。然后安装ca-certificates
  1. apt install ca-certificates
复制代码
待ca-certificates安装完成后,再把源网址改回https,这样就可以正常使用 Debian 11 的阿里云源进行更新和升级了。

152

主题

48

回帖

1137

积分

管理员

积分
1137
 楼主| 发表于 2024-12-2 13:26:23 | 显示全部楼层
debian11.x(腾讯云源)
  1. # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
  2. debian11 配置方式如下(各仓库按需使用):

  3. deb http://mirrors.tencent.com/debian bullseye main contrib non-free
  4. #deb-src http://mirrors.tencent.com/debian bullseye main contrib non-free
  5. deb http://mirrors.tencent.com/debian bullseye-updates main contrib non-free
  6. #deb-src http://mirrors.tencent.com/debian bullseye-updates main contrib non-free
  7. deb http://mirrors.tencent.com/debian-security bullseye-security main contrib non-free
  8. #deb-src http://mirrors.tencent.com/debian-security bullseye-security main contrib non-free
  9. #deb http://mirrors.tencent.com/debian bullseye-backports main contrib non-free
  10. #deb-src http://mirrors.tencent.com/debian bullseye-backports main contrib non-free
  11. #deb http://mirrors.tencent.com/debian bullseye-proposed-updates main contrib non-free
  12. #deb-src http://mirrors.tencent.com/debian bullseye-proposed-updates main contrib non-free
复制代码





您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表