Skip to content

debian 12.7 安装vmware-tools记录

本文记录debian 12.7安装vmware-tools过程中找不到depmod之类文件的问题。

debian使用的环境如下:

root@debian:~# hostnamectl
 Static hostname: debian
       Icon name: computer-vm
         Chassis: vm 🖴
  Virtualization: vmware
Operating System: Debian GNU/Linux 12 (bookworm)
          Kernel: Linux 6.1.0-25-amd64
    Architecture: x86-64
 Hardware Vendor: VMware, Inc.
  Hardware Model: VMware Virtual Platform
Firmware Version: 6.00
root@debian:~# cat /etc/debian_version
12.7
root@debian:~#

vmware 使用的环境如下:

VMware® Workstation 16 Pro
16.2.4 build-20089737

vmware tools参考的安装文档:

https://docs.vmware.com/cn/VMware-Workstation-Pro/16.0/com.vmware.ws.using.doc/GUID-08BB9465-D40A-4E16-9E15-8C016CC8166F.html

遇到的问题

在使用root权限执行./vmware-install.pl的时候,提示找不到各种软件,如depmodmodprobermmod等。

# ./vmware-install.pl
Setup is unable to find the "depmod" program on your machine. Please make sure
it is installed. Do you want to specify the location of this program by hand?
[yes] Use of uninitialized value $gOption{"default"} in numeric eq (==) at ./vmware-install.pl line 866.
yes

What is the location of the "depmod" program on your
machine? Use of uninitialized value $gOption{"default"} in numeric eq (==) at ./vmware-install.pl line 866, <STDIN> line 1.

Setup is unable to find the "modprobe" program on your machine. Please make
sure it is installed. Do you want to specify the location of this program by
hand? [yes] Use of uninitialized value $gOption{"default"} in numeric eq (==) at ./vmware-install.pl line 866, <STDIN> line 4.

Setup is unable to find the "rmmod" program on your machine. Please make sure
it is installed. Do you want to specify the location of this program by hand?
[yes] Use of uninitialized value $gOption{"default"} in numeric eq (==) at ./vmware-install.pl line 866, <STDIN> line 6.
...

解决

首先使用find搜索所有目录,是否包含depmod文件。

# find / -name depmod
/usr/sbin/depmod
#

该文件在/usr/sbin下,怀疑是PATH变量未加入/usr/sbin/,再次查看PATH变量内容。

root@debian:/home/wangli/vmware-tools-distrib# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
root@debian:/home/wangli/vmware-tools-distrib#

PATH变量确实没有该内容。

手动添加PATH变量。

# PATH=$PATH:/usr/sbin/
# export PATH
#

再次执行./vmware-install.pl脚本,按照提示,即可安装成功。




debian 12.7 安装vmware-tools记录

https://wangli2025.github.io/2024/11/21/vmware-install-tools.html

本站均为原创文章,采用 CC BY-NC-ND 4.0 协议。转载请注明出处,不得用于商业用途。

Comments