By 大伟哥 |
从 Debian 官网下载 Debian 11 的网络安装盘后,软件源列表里随便选了一个,进入界面后运行 apt update 发现速度比较慢而且会出错,还是换成习惯用的阿里云Debian 11的源好用。
修改/etc/apt/sources.list,加入下面的行:
deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib deb https://mirrors.aliyun.com/debian-security/ bullseye-security main deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
并把原来定义的源用#号注释掉,保存。
接下来运行 apt update 可能会报错:
Could not handshake: Error in the certificate verification.
这是因为安全证书认证失败了,没法更新系统。这时候可以先把源网址的协议从https改成http,暂时不使用安全链接。然后安装ca-certificates
apt install ca-certificates
待ca-certificates安装完成后,再把源网址改回https,这样就可以正常使用 Debian 11 的阿里云源进行更新和升级了。
- 1324 阅读
添加新评论