装上之后第一件事就是执行apt-get update && apt-get upgrade,结果却出现了这样的错误

我添加的是中科大的更新源,在浏览器中是可以正常打开的:

deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

#中科大

deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

#阿里云

#deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib

#deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib

#清华大学

#deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free

#deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free

#浙大

#deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free

#deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free

#东软大学

#deb http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib

#deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib

#官方源

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

#deb-src http://http.kali.org/kali kali-rolling main non-free contrib

#重庆大学

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

#deb-src http://http.kali.org/kali kali-rolling main non-free contrib

可是添加到 /etc/apt/source.list之后,执行apt-update就会出现上面的错误提示

在多方搜索无果之后,我决定静下心来认真阅读一下kali中提供的文档,根据上面的提示, 我查看了apt-secure(8)——>命令man 8 apt-secure

DESCRIPTION

Starting with version 0.6, APT contains code that does signature

checking of the Release file for all repositories. This ensures that

data like packages in the archive can't be modified by people who have

no access to the Release file signing key. Starting with version 1.1

APT requires repositories to provide recent authentication information

for unimpeded usage of the repository. Since version 1.5 changes in the

information contained in the Release file about the repository need to

be confirmed before APT continues to apply updates from this

repository.

Note: All APT-based package management front-ends like apt-get(8),

aptitude(8) and synaptic(8) support this authentication feature, so

this manpage uses APT to refer to them all for simplicity only.

首先阅读一下apt-secure的描述,读完之后我们可以知道,之所以一直更新不成功,是因为没有签名或者是有签名但是apt没有对应的key的package是不被信任的,安全起见,默认是不会采用这种源来进行更新的

继续往下阅读

UNSIGNED REPOSITORIES

If an archive has an unsigned Release file or no Release file at all

current APT versions will refuse to download data from them by default

in update operations and even if forced to download front-ends like

apt-get(8) will require explicit confirmation if an installation

request includes a package from such an unauthenticated archive.

You can force all APT clients to raise only warnings by setting the

       configuration option Acquire::AllowInsecureRepositories to true.

Individual repositories can also be allowed to be insecure via the

sources.list(5) option allow-insecure=yes. Note that insecure

repositories are strongly discouraged and all options to force apt to

continue supporting them will eventually be removed. Users also have

the Trusted option available to disable even the warnings, but be sure

to understand the implications as detailed in sources.list(5).

第二段的标题正是没有签名的仓库,这正是我们需要的说明
You can force all APT clients to raise only warnings by setting the
configuration option Acquire::AllowInsecureRepositories to true.

这句话就是解决问题的关键,虽然国内的源没有签名,或者签名过期(失效),但是我们可以强制apt进行更新,忽略仓库的安全性,而想要达到这个目的,我们就需要对APT的配置文件进行修改
我搜索了apt.conf这个关键字,但相关网页都是英文的,硬着头皮读完之后发现我的kali中并没有apt.conf文件,在我的/etc/apt目录下,只有一个apt.conf.d目录,cd进该目录:

那么多配置文件,我也不知道到底该改哪一个,然后又去百度了一会儿,看到了这篇文章
https://wiki.debian.org/AptConf

然后我就抱着试一试的心态打开了70debconf文件,按照前面man文档的指导,在里面输入了Acquire::AllowInsecureRepositories “true”;
然后执行apt-config dump,查看apt的对应配置有无生效

Acquire::AllowInsecureRepositories的属性值由最初的”0”变成了”true”
说明更改配置成功,然后赶紧敲入apt-get update && apt-get upgrade

Kali的源得数字验证问题的更多相关文章

  1. kali换源及安装docker

    kali换源及安装docker 以管理员身份运行. 换源,记得先备份, cp /etc/apt/sources.list /etc/apt/sources.list.bak 然后修改/etc/apt/ ...

  2. 超简单的js数字验证

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or ...

  3. kali 更新源

    个人收集的kali 更新源: 修改更新源: vim /etc/apt/sources.list 更新源列表包: #apt-get update 更新系统软件: #apt-get upgrade #官方 ...

  4. javascript数字验证输入

    javascript数字验证功能: <html> <body> <p>请输入数字.如果输入值不是数字,浏览器会弹出提示框.</p> <input ...

  5. Debian 8添加kali更新源并安装metasploit

    一.Debian 8添加kali更新源 中科大kali更新源: deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contr ...

  6. Atitit  验证 数字验证 非空验证的最佳算法  h5

    Atitit  验证 数字验证 非空验证的最佳算法  h5 <td><select class="searchBox-select"   style=" ...

  7. jquery纯数字验证

    $(document).ready(function(){  //纯数字验证,只让输入数字,比如-号等都不然输入.  $('#user-defined').unbind();  $('#user-de ...

  8. kali更新源相关 -- 没有release文件、签名无效、404

    kali更新源相关 -- 没有release文件.签名无效.404 这个随笔主要是处理Mac下使用VMare虚拟机安装Kali时候我遇到的一些关于更新源的问题 (因为本人为了这个问题折腾了四五个小时, ...

  9. 几个有用的javascript(日期比较,数字验证,数字和汉字长度计算)

    1:日期大Js代码 //人员失效职位日期是否小于组织失效日期 function perDateInvalidate(){ var flag = true; //组织失效日期 var orgDate = ...

随机推荐

  1. 一:1.1 python程序与数据储存【进制转换】

    二进制 :0 1 [逢二进一]0+0=00+1=11+1=1011+1=100 1 1+ 1------ 100 八进制: 0 1 2 3 4 5 6 7 [逢八进一] 1+7=101+2=3 十进制 ...

  2. 题解 CF1000E 【We Need More Bosses】

    这道题绝不是紫题... 题目的意思其实是让你求一个无向无重边图的直径. 对于求直径的问题我们以前研究过树的直径,可以两遍dfs或者两边bfs解决. 对于图显然不能这样解决,因为图上两点之间的简单路径不 ...

  3. Flexible implementation of a system management mode (SMM) in a processor

    A system management mode (SMM) of operating a processor includes only a basic set of hardwired hooks ...

  4. 洛谷——P1965 转圈游戏

    https://www.luogu.org/problem/show?pid=1965 题目描述 n 个小伙伴(编号从 0 到 n-1)围坐一圈玩游戏.按照顺时针方向给 n 个位置编号,从0 到 n- ...

  5. eclipse下Tomcat7.0启动奔溃问题

    好久没用Eclipse了,如今上班这家公司正好用到了,完后用Tomcat启动项目一直报一个错,例如以下图 错误代码例如以下: watermark/2/text/aHR0cDovL2Jsb2cuY3Nk ...

  6. 3.React Native在Android中自己定义Component和Module

    React Native终于展示的UI全是Native的UI.将Native的信息封装成React方便的调用. 那么Native是怎样封装成React调用的?Native和React是怎样交互的? V ...

  7. Azure 配置高可用的准备系列工作-建立不同区域的存储账户和建立网络!

     我们谈到我们的业务,常常谈到一个词.三层架构,就是我们的UI层.数据訪问层和数据存储层的分离,通常情况下我们的业务高可用必须满足这三层的所有高可用的情况下才干达到最高级别的高可用. 那么谈到Az ...

  8. HDUOJ Let the Balloon Rise 1004

     /* Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Ja ...

  9. 实习第一天(安装svn管理工具跟tomcat插件)

    在eclipse中安装svn管理解压工具是有好几种方法. 方法1 1>可以直接下载svn插件subclipse,之后进行解压 2>然后将将插件包features和plugins目录中的文件 ...

  10. HTTP协议学习,post于get;用Fiddler测试请求

    转载 收藏于网络 1.简介: HTTP协议:Hypertext transfer protocol 超文本 传输 协议 它是TCP/IP协议集中的一个运用层协议. 用于定义WEB浏览器和WEB服务器之 ...