当前位置:   article > 正文

debian11 设置apt源为国内_debian11国内源

debian11国内源

  话不多说,直接上代码。将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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

  执行命令: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
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

  实测不行报错如下:

错误: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: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

  更新dns,在配置文件中加入阿里巴巴提供的DNS域名解析,然而还是不行

sudo vim  /etc/resolv.conf 
  • 1
nameserver 8.8.8.8 
nameserver 8.8.4.4
nameserver 223.5.5.5
nameserver 223.6.6.
  • 1
  • 2
  • 3
  • 4
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/172348
推荐阅读
相关标签
  

闽ICP备14008679号