一.更新系统
1.1 添加更新源地址
[email protected]:~# vi /etc/apt/sources.list
在文件结尾添加更新源地址,并输入:wq保存
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contribdeb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
1.2 更新系统
以下步骤重复执行2遍
[email protected]:~# apt-get update #只更新软件包的索引源[email protected]:~# apt-get update --fix-missing #当update时出现大量报错,实在没办法,添加参数进行更新[email protected]:~# apt-get upgrade #升级系统上安装的所有软件包[email protected]:~# apt-get dist-upgrade #进行大的版本更新
二、安装vmtools
2.1 安装linux头文件
[email protected]:~# apt-get install linux-headers-$(uname -r)
2.2 安装vmtools
1、单击vmware菜单--虚拟机--安装VMware Tools
2、双击打开光驱,将VMwareTools-10.1.6-5214329.tar.gz拷贝到桌面
3、双击打开VMwareTools-10.1.6-5214329.tar.gz,并将里面的文件夹解压到桌面
4、打开vmware-tools-distrib文件夹,在当前目录右键选择--在终端打开
5、开始安装vmtools
[email protected]:~/桌面/vmware-tools-distrib# ls bin caf doc etc FILES INSTALL installer lib vgauth vmware-install.pl [email protected]:~/桌面/vmware-tools-distrib# chmod +x vmware-install.pl [email protected]:~/桌面/vmware-tools-distrib# ls -l 总用量 392 drwxr-xr-x 2 root root 4096 3月 17 2017 bin drwxr-xr-x 5 root root 4096 3月 17 2017 caf drwxr-xr-x 2 root root 4096 3月 17 2017 doc drwxr-xr-x 5 root root 4096 3月 17 2017 etc -rw-r--r-- 1 root root 149442 3月 17 2017 FILES -rw-r--r-- 1 root root 2538 3月 17 2017 INSTALL drwxr-xr-x 2 root root 4096 3月 17 2017 installer drwxr-xr-x 15 root root 4096 3月 17 2017 lib drwxr-xr-x 3 root root 4096 3月 17 2017 vgauth -rwxr-xr-x 1 root root 216748 3月 17 2017 vmware-install.pl [email protected]:~/桌面/vmware-tools-distrib# ./vmware-install.pl
6、接下来一路回车,然后重启系统
重启系统后发现vmware中的虚拟机不是全屏,单击vmware菜单--查看--自动调整大小--自动适应客户机;然后就能查看到虚拟机可以全屏了
7、之前安装过vmtools,但未安装成功,提示以下代码:
A previous installation of VMware Tools has been detected. The previous installation was made by the tar installer (version 4). Keeping the tar4 installer database format. You have a version of VMware Tools installed. Continuing this install will first uninstall the currently installed version. Do you wish to continue? (yes/no) [yes] Error: Unable to find the binary installation directory (answer BINDIR) in the installer database file "/etc/vmware-tools/locations". Uninstall failed. Please correct the failure and re run the install. Execution aborted.
解决方法:
rm -rf /etc/vmware-tools rm -rf /tmp/vm*
删除之后再重新安装一次
参考文档:
https://yq.aliyun.com/articles/40014
时间: 2024-10-14 04:24:10