Java教程

debian 9 系统apt源配置阿里源 -亲测有效(debian9 apt-get update 404)

本文主要是介绍debian 9 系统apt源配置阿里源 -亲测有效(debian9 apt-get update 404),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

debian9执行apt-get update -y 报错404

root@bogon:/etc/apt# apt-get update && apt-get upgrade && apt-get dist-upgrade 
Ign:1 http://mirrors.ustc.edu.cn/kali kali InRelease
Ign:2 http://mirrors.ustc.edu.cn/kali-security kali/updates InRelease
Err:3 http://mirrors.ustc.edu.cn/kali kali Release
  404  Not Found [IP: 218.104.71.170 80]
Err:4 http://mirrors.ustc.edu.cn/kali-security kali/updates Release
  404  Not Found [IP: 218.104.71.170 80]
Reading package lists... Done
E: The repository 'http://mirrors.ustc.edu.cn/kali kali Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://mirrors.ustc.edu.cn/kali-security kali/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details

编辑/etc/apt/sources.list文件(需要使用sudo), 替换为下面(操作前请做好相应备份)

deb http://mirrors.aliyun.com/debian stretch main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free
deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free

此文章基于 https://bmvps.com/centos7-8-change-source/得到解决,感谢作者!

这篇关于debian 9 系统apt源配置阿里源 -亲测有效(debian9 apt-get update 404)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!