Kali 系统 apt-get update更新失败解决方案

事件起因 :
想安装xrdp发现无法使用apt安装,然后更新发现更新失败,进而想到修改为国内源,修改源以后 发现报错如下:

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.
![](http://i2.51cto.com/102?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)

解决方案

通过百度 发现可以修改为如下:
参考://docs.kali.org/general-use/kali-linux-sources-list-repositories

编辑apt-get远程源文件

vim /etc/apt/sources-list

注释掉所有的,然后添加下面两条:

deb http://http.kali.org/kali kali-rolling main contrib non-free 
deb http://old.kali.org/kali sana main non-free contrib

再次更新效果如下: 【已经可以更新】

root@bogon:/etc/apt# apt-get update
Get:1 http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease [30.5 kB]
Get:2 http://old.kali.org/kali sana InRelease [20.3 kB]                          
Get:3 http://mirrors.neusoft.edu.cn/kali kali-rolling/main amd64 Packages [15.6 MB]
Get:4 http://old.kali.org/kali sana/main amd64 Packages [12.8 MB]  
Get:5 http://mirrors.neusoft.edu.cn/kali kali-rolling/contrib amd64 Packages [112 kB]                                                                                                                                                                                        
Get:6 http://mirrors.neusoft.edu.cn/kali kali-rolling/non-free amd64 Packages [165 kB]                                                                                                                                                                                       
Get:7 http://old.kali.org/kali sana/non-free amd64 Packages [163 kB]                                                                                                                                                                                                         
Get:8 http://old.kali.org/kali sana/contrib amd64 Packages [87.7 kB]                                                                                                                                                                                                         
Fetched 29.0 MB in 10min 44s (45.0 kB/s)                                                                                                                                                                                                                                     
Reading package lists... Done

更新命令:

apt-get update && apt-get upgrade && apt-get dist-upgrade


本文转自 1inux 51CTO博客,原文链接:http://blog.51cto.com/1inux/2048278

你可能感兴趣的:(Kali 系统 apt-get update更新失败解决方案)