关于kali安装VMtools报错问题的解决

基于kali安装Vmtools时,解压完成VMtools工具包,执行./VMTools-install.pl安装中报错(Process:1439):Glib-CRITICAL ** :g_file_test: assertion ‘filename != NULL’  failed 可查看kali官方文档apt-secure(8)——>命令man 8 apt-secure。

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进该目录: 
 关于kali安装VMtools报错问题的解决
那么多配置文件,我也不知道到底该改哪一个,然后又去百度了一会儿,看到了这篇文章 
https://wiki.debian.org/AptConf 
然后我就抱着试一试的心态打开了70debconf文件,按照前面man文档的指导,在里面输入了Acquire::AllowInsecureRepositories “true”; 
然后执行apt-config dump,查看apt的对应配置有无生效 
 关于kali安装VMtools报错问题的解决
Acquire::AllowInsecureRepositories的属性值由最初的”0”变成了”true” ,说明更改配置成功。

添加VMTools更新源:deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib(此源为kali自主开发的VMtools工具)

#vim /etc/apt/source.list

该文件中添加上述更新源,:wq保存退出。

2、输入apt-get update报错

下载最新key添加到keylist

wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

#apt-get update

#apt-get dist-upgrade

#reboot

#apt-get update

#apt-get install open-vm-tools-desktop fuse

#reboot

即可完成VMTools安装。