赞
踩
话不多说,直接上代码。将apt源设置为网易
cat > /etc/apt/sources.list << EOF
deb https://mirrors.163.com/debian/ bullseye main non-free contrib
deb-src https://mirrors.163.com/debian/ bullseye main non-free contrib
deb https://mirrors.163.com/debian-security/ bullseye-security main
deb-src https://mirrors.163.com/debian-security/ bullseye-security main
deb https://mirrors.163.com/debian/ bullseye-updates main non-free contrib
deb-src https://mirrors.163.com/debian/ bullseye-updates main non-free contrib
deb https://mirrors.163.com/debian/ bullseye-backports main non-free contrib
deb-src https://mirrors.163.com/debian/ bullseye-backports main non-free contrib
EOF
执行命令:apt-get update
查阅资料时,很多都是设置阿里云的源
cat > /etc/apt/sources.list << EOF deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye main contrib non-free deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye-updates main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye-updates main contrib non-free deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye-backports main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye-backports main contrib non-free deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye-proposed-updates main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye-proposed-updates main contrib non-free deb http://mirrors.cloud.aliyuncs.com/debian-security/ bullseye-security main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian-security/ bullseye-security main contrib non-free EOF
实测不行报错如下:
错误:1 http://mirrors.cloud.aliyuncs.com/debian bullseye InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” 错误:2 http://mirrors.cloud.aliyuncs.com/debian bullseye-updates InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” 错误:3 http://mirrors.cloud.aliyuncs.com/debian bullseye-backports InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” 错误:4 http://mirrors.cloud.aliyuncs.com/debian bullseye-proposed-updates InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” 错误:5 http://mirrors.cloud.aliyuncs.com/debian-security bullseye-security InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” 正在读取软件包列表... 完成 W: 无法下载 http://mirrors.cloud.aliyuncs.com/debian/dists/bullseye/InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” W: 无法下载 http://mirrors.cloud.aliyuncs.com/debian/dists/bullseye-updates/InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” W: 无法下载 http://mirrors.cloud.aliyuncs.com/debian/dists/bullseye-backports/InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” W: 无法下载 http://mirrors.cloud.aliyuncs.com/debian/dists/bullseye-proposed-updates/InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” W: 无法下载 http://mirrors.cloud.aliyuncs.com/debian-security/dists/bullseye-security/InRelease 无法解析域名“mirrors.cloud.aliyuncs.com” W: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。
更新dns,在配置文件中加入阿里巴巴提供的DNS域名解析,然而还是不行
sudo vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 223.5.5.5
nameserver 223.6.6.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。