我正在尝试在 kali linux 上运行 VMware,但是当我尝试运行它时显示消息:Before you can run VMware several modules must be compiled and loaded into the running kernel
这是日志:
2018-04-23T20:11:48.254+04:30| vthread-1| I125: Log for VMware Workstation pid=8508 version=14.1.0 build=build-7370693 option=Release
2018-04-23T20:11:48.254+04:30| vthread-1| I125: The process is 64-bit.
2018-04-23T20:11:48.254+04:30| vthread-1| I125: Host codepage=UTF-8 encoding=UTF-8
2018-04-23T20:11:48.254+04:30| vthread-1| I125: Host is Linux 4.15.0-2-amd64 Kali GNU/Linux Rolling
2018-04-23T20:11:48.254+04:30| vthread-1| I125: DictionaryLoad: Cannot open file "/usr/lib/vmware/settings": No such file or directory.
2018-04-23T20:11:48.254+04:30| vthread-1| I125: [msg.dictionary.load.openFailed] Cannot open file "/usr/lib/vmware/settings": No such file or directory.
2018-04-23T20:11:48.254+04:30| vthread-1| I125: PREF Optional preferences file not found at /usr/lib/vmware/settings. Using default values.
2018-04-23T20:11:48.254+04:30| vthread-1| I125: DictionaryLoad: Cannot open file "/home/linux/.vmware/config": No such file or directory.
2018-04-23T20:11:48.254+04:30| vthread-1| I125: [msg.dictionary.load.openFailed] Cannot open file "/home/linux/.vmware/config": No such file or directory.
2018-04-23T20:11:48.254+04:30| vthread-1| I125: PREF Optional preferences file not found at /home/linux/.vmware/config. Using default values.
2018-04-23T20:11:48.254+04:30| vthread-1| I125: DictionaryLoad: Cannot open file "/home/linux/.vmware/preferences": No such file or directory.
2018-04-23T20:11:48.254+04:30| vthread-1| I125: [msg.dictionary.load.openFailed] Cannot open file "/home/linux/.vmware/preferences": No such file or directory.
2018-04-23T20:11:48.254+04:30| vthread-1| I125: PREF Optional preferences file not found at /home/linux/.vmware/preferences. Using default values.
2018-04-23T20:11:48.326+04:30| vthread-1| W115: Logging to /tmp/vmware-root/vmware-8508.log
2018-04-23T20:11:48.340+04:30| vthread-1| I125: Obtaining info using the running kernel.
2018-04-23T20:11:48.340+04:30| vthread-1| I125: Created new pathsHash.
2018-04-23T20:11:48.340+04:30| vthread-1| I125: Setting header path for 4.15.0-2-amd64 to "/lib/modules/4.15.0-2-amd64/build/include".
2018-04-23T20:11:48.340+04:30| vthread-1| I125: Validating path "/lib/modules/4.15.0-2-amd64/build/include" for kernel release "4.15.0-2-amd64".
2018-04-23T20:11:48.340+04:30| vthread-1| I125: Failed to find /lib/modules/4.15.0-2-amd64/build/include/linux/version.h
2018-04-23T20:11:48.340+04:30| vthread-1| I125: /lib/modules/4.15.0-2-amd64/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.
2018-04-23T20:11:48.340+04:30| vthread-1| I125: using /usr/bin/gcc-7 for preprocess check
2018-04-23T20:11:48.348+04:30| vthread-1| I125: Preprocessed UTS_RELEASE, got value "4.15.0-2-amd64".
2018-04-23T20:11:48.348+04:30| vthread-1| I125: The header path "/lib/modules/4.15.0-2-amd64/build/include" for the kernel "4.15.0-2-amd64" is valid. Whoohoo!
2018-04-23T20:11:48.571+04:30| vthread-1| I125: found symbol version file /lib/modules/4.15.0-2-amd64/build/Module.symvers
2018-04-23T20:11:48.571+04:30| vthread-1| I125: Reading symbol versions from /lib/modules/4.15.0-2-amd64/build/Module.symvers.
2018-04-23T20:11:48.597+04:30| vthread-1| I125: Read 20056 symbol versions
2018-04-23T20:11:48.597+04:30| vthread-1| I125: Reading in info for the vmmon module.
2018-04-23T20:11:48.597+04:30| vthread-1| I125: Reading in info for the vmnet module.
2018-04-23T20:11:48.597+04:30| vthread-1| I125: Reading in info for the vmblock module.
2018-04-23T20:11:48.597+04:30| vthread-1| I125: Reading in info for the vmci module.
2018-04-23T20:11:48.597+04:30| vthread-1| I125: Reading in info for the vsock module.
2018-04-23T20:11:48.597+04:30| vthread-1| I125: Setting vsock to depend on vmci.
2018-04-23T20:11:48.597+04:30| vthread-1| I125: Invoking modinfo on "vmmon".
2018-04-23T20:11:48.600+04:30| vthread-1| I125: "/sbin/modinfo" exited with status 256.
2018-04-23T20:11:48.600+04:30| vthread-1| I125: Invoking modinfo on "vmnet".
2018-04-23T20:11:48.602+04:30| vthread-1| I125: "/sbin/modinfo" exited with status 256.
2018-04-23T20:11:48.602+04:30| vthread-1| I125: Invoking modinfo on "vmblock".
2018-04-23T20:11:48.604+04:30| vthread-1| I125: "/sbin/modinfo" exited with status 256.
2018-04-23T20:11:48.604+04:30| vthread-1| I125: Invoking modinfo on "vmci".
2018-04-23T20:11:48.606+04:30| vthread-1| I125: "/sbin/modinfo" exited with status 256.
2018-04-23T20:11:48.606+04:30| vthread-1| I125: Invoking modinfo on "vsock".
2018-04-23T20:11:48.608+04:30| vthread-1| I125: "/sbin/modinfo" exited with status 0.
2018-04-23T20:11:48.623+04:30| vthread-1| I125: to be installed: vmmon status: 0
2018-04-23T20:11:48.623+04:30| vthread-1| I125: to be installed: vmnet status: 0
2018-04-23T20:11:48.639+04:30| vthread-1| I125: Obtaining info using the running kernel.
2018-04-23T20:11:48.639+04:30| vthread-1| I125: Setting header path for 4.15.0-2-amd64 to "/lib/modules/4.15.0-2-amd64/build/include".
2018-04-23T20:11:48.639+04:30| vthread-1| I125: Validating path "/lib/modules/4.15.0-2-amd64/build/include" for kernel release "4.15.0-2-amd64".
2018-04-23T20:11:48.639+04:30| vthread-1| I125: Failed to find /lib/modules/4.15.0-2-amd64/build/include/linux/version.h
2018-04-23T20:11:48.639+04:30| vthread-1| I125: /lib/modules/4.15.0-2-amd64/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.
2018-04-23T20:11:48.639+04:30| vthread-1| I125: using /usr/bin/gcc-7 for preprocess check
2018-04-23T20:11:48.646+04:30| vthread-1| I125: Preprocessed UTS_RELEASE, got value "4.15.0-2-amd64".
2018-04-23T20:11:48.646+04:30| vthread-1| I125: The header path "/lib/modules/4.15.0-2-amd64/build/include" for the kernel "4.15.0-2-amd64" is valid. Whoohoo!
2018-04-23T20:11:48.867+04:30| vthread-1| I125: found symbol version file /lib/modules/4.15.0-2-amd64/build/Module.symvers
2018-04-23T20:11:48.867+04:30| vthread-1| I125: Reading symbol versions from /lib/modules/4.15.0-2-amd64/build/Module.symvers.
2018-04-23T20:11:48.892+04:30| vthread-1| I125: Read 20056 symbol versions
2018-04-23T20:11:48.893+04:30| vthread-1| I125: Kernel header path retrieved from FileEntry: /lib/modules/4.15.0-2-amd64/build/include
2018-04-23T20:11:48.893+04:30| vthread-1| I125: Update kernel header path to /lib/modules/4.15.0-2-amd64/build/include
2018-04-23T20:11:48.893+04:30| vthread-1| I125: Validating path "/lib/modules/4.15.0-2-amd64/build/include" for kernel release "4.15.0-2-amd64".
2018-04-23T20:11:48.893+04:30| vthread-1| I125: Failed to find /lib/modules/4.15.0-2-amd64/build/include/linux/version.h
2018-04-23T20:11:48.893+04:30| vthread-1| I125: /lib/modules/4.15.0-2-amd64/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.
2018-04-23T20:11:48.893+04:30| vthread-1| I125: using /usr/bin/gcc-7 for preprocess check
2018-04-23T20:11:48.900+04:30| vthread-1| I125: Preprocessed UTS_RELEASE, got value "4.15.0-2-amd64".
2018-04-23T20:11:48.900+04:30| vthread-1| I125: The header path "/lib/modules/4.15.0-2-amd64/build/include" for the kernel "4.15.0-2-amd64" is valid. Whoohoo!
2018-04-23T20:11:48.902+04:30| vthread-1| I125: Found compiler at "/usr/bin/gcc"
2018-04-23T20:11:48.906+04:30| vthread-1| I125: Got gcc version "7".
2018-04-23T20:11:48.906+04:30| vthread-1| I125: The GCC version matches the kernel GCC minor version like a glove.
2018-04-23T20:11:48.910+04:30| vthread-1| I125: Got gcc version "7".
2018-04-23T20:11:48.910+04:30| vthread-1| I125: The GCC version matches the kernel GCC minor version like a glove.
2018-04-23T20:11:48.912+04:30| vthread-1| I125: Trying to find a suitable PBM set for kernel "4.15.0-2-amd64".
2018-04-23T20:11:48.912+04:30| vthread-1| I125: No matching PBM set was found for kernel "4.15.0-2-amd64".
2018-04-23T20:11:48.912+04:30| vthread-1| I125: The GCC version matches the kernel GCC minor version like a glove.
2018-04-23T20:11:48.912+04:30| vthread-1| I125: Validating path "/lib/modules/4.15.0-2-amd64/build/include" for kernel release "4.15.0-2-amd64".
2018-04-23T20:11:48.912+04:30| vthread-1| I125: Failed to find /lib/modules/4.15.0-2-amd64/build/include/linux/version.h
2018-04-23T20:11:48.912+04:30| vthread-1| I125: /lib/modules/4.15.0-2-amd64/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.
2018-04-23T20:11:48.912+04:30| vthread-1| I125: using /usr/bin/gcc-7 for preprocess check
2018-04-23T20:11:48.922+04:30| vthread-1| I125: Preprocessed UTS_RELEASE, got value "4.15.0-2-amd64".
2018-04-23T20:11:48.922+04:30| vthread-1| I125: The header path "/lib/modules/4.15.0-2-amd64/build/include" for the kernel "4.15.0-2-amd64" is valid. Whoohoo!
2018-04-23T20:11:48.925+04:30| vthread-1| I125: The GCC version matches the kernel GCC minor version like a glove.
2018-04-23T20:11:48.925+04:30| vthread-1| I125: Validating path "/lib/modules/4.15.0-2-amd64/build/include" for kernel release "4.15.0-2-amd64".
2018-04-23T20:11:48.925+04:30| vthread-1| I125: Failed to find /lib/modules/4.15.0-2-amd64/build/include/linux/version.h
2018-04-23T20:11:48.925+04:30| vthread-1| I125: /lib/modules/4.15.0-2-amd64/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.
2018-04-23T20:11:48.925+04:30| vthread-1| I125: using /usr/bin/gcc-7 for preprocess check
2018-04-23T20:11:48.937+04:30| vthread-1| I125: Preprocessed UTS_RELEASE, got value "4.15.0-2-amd64".
2018-04-23T20:11:48.937+04:30| vthread-1| I125: The header path "/lib/modules/4.15.0-2-amd64/build/include" for the kernel "4.15.0-2-amd64" is valid. Whoohoo!
2018-04-23T20:11:48.937+04:30| vthread-1| I125: Using temp dir "/tmp".
2018-04-23T20:11:48.940+04:30| vthread-1| I125: Obtaining info using the running kernel.
2018-04-23T20:11:48.940+04:30| vthread-1| I125: Setting header path for 4.15.0-2-amd64 to "/lib/modules/4.15.0-2-amd64/build/include".
2018-04-23T20:11:48.940+04:30| vthread-1| I125: Validating path "/lib/modules/4.15.0-2-amd64/build/include" for kernel release "4.15.0-2-amd64".
2018-04-23T20:11:48.940+04:30| vthread-1| I125: Failed to find /lib/modules/4.15.0-2-amd64/build/include/linux/version.h
2018-04-23T20:11:48.940+04:30| vthread-1| I125: /lib/modules/4.15.0-2-amd64/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.
2018-04-23T20:11:48.940+04:30| vthread-1| I125: using /usr/bin/gcc-7 for preprocess check
2018-04-23T20:11:48.951+04:30| vthread-1| I125: Preprocessed UTS_RELEASE, got value "4.15.0-2-amd64".
2018-04-23T20:11:48.951+04:30| vthread-1| I125: The header path "/lib/modules/4.15.0-2-amd64/build/include" for the kernel "4.15.0-2-amd64" is valid. Whoohoo!
2018-04-23T20:11:49.171+04:30| vthread-1| I125: found symbol version file /lib/modules/4.15.0-2-amd64/build/Module.symvers
2018-04-23T20:11:49.171+04:30| vthread-1| I125: Reading symbol versions from /lib/modules/4.15.0-2-amd64/build/Module.symvers.
2018-04-23T20:11:49.196+04:30| vthread-1| I125: Read 20056 symbol versions
2018-04-23T20:11:49.196+04:30| vthread-1| I125: Invoking modinfo on "vmmon".
2018-04-23T20:11:49.200+04:30| vthread-1| I125: "/sbin/modinfo" exited with status 256.
2018-04-23T20:11:49.200+04:30| vthread-1| I125: Invoking modinfo on "vmnet".
2018-04-23T20:11:49.203+04:30| vthread-1| I125: "/sbin/modinfo" exited with status 256.
2018-04-23T20:11:49.594+04:30| vthread-1| I125: Setting destination path for vmmon to "/lib/modules/4.15.0-2-amd64/misc/vmmon.ko".
2018-04-23T20:11:49.595+04:30| vthread-1| I125: Extracting the vmmon source from "/usr/lib/vmware/modules/source/vmmon.tar".
2018-04-23T20:11:49.606+04:30| vthread-1| I125: Successfully extracted the vmmon source.
2018-04-23T20:11:49.606+04:30| vthread-1| I125: Building module with command "/usr/bin/make -j4 -C /tmp/modconfig-stxrjw/vmmon-only auto-build HEADER_DIR=/lib/modules/4.15.0-2-amd64/build/include CC=/usr/bin/gcc IS_GCC_3=no"
2018-04-23T20:11:52.158+04:30| vthread-1| W115: Failed to build vmmon. Failed to execute the build command.
2018-04-23T20:11:52.161+04:30| vthread-1| I125: Setting destination path for vmnet to "/lib/modules/4.15.0-2-amd64/misc/vmnet.ko".
2018-04-23T20:11:52.161+04:30| vthread-1| I125: Extracting the vmnet source from "/usr/lib/vmware/modules/source/vmnet.tar".
2018-04-23T20:11:52.170+04:30| vthread-1| I125: Successfully extracted the vmnet source.
2018-04-23T20:11:52.170+04:30| vthread-1| I125: Building module with command "/usr/bin/make -j4 -C /tmp/modconfig-stxrjw/vmnet-only auto-build HEADER_DIR=/lib/modules/4.15.0-2-amd64/build/include CC=/usr/bin/gcc IS_GCC_3=no"
2018-04-23T20:11:56.805+04:30| vthread-1| I125: Successfully built vmnet. Module is currently at "/tmp/modconfig-stxrjw/vmnet.o".
2018-04-23T20:11:56.805+04:30| vthread-1| I125: Found the vmnet symvers file at "/tmp/modconfig-stxrjw/vmnet-only/Module.symvers".
2018-04-23T20:11:56.805+04:30| vthread-1| I125: Installing vmnet from /tmp/modconfig-stxrjw/vmnet.o to /lib/modules/4.15.0-2-amd64/misc/vmnet.ko.
2018-04-23T20:11:56.809+04:30| vthread-1| I125: Registering file "/lib/modules/4.15.0-2-amd64/misc/vmnet.ko".
2018-04-23T20:11:57.108+04:30| vthread-1| I125: "/usr/lib/vmware-installer/2.1.0/vmware-installer" exited with status 0.
2018-04-23T20:11:57.109+04:30| vthread-1| I125: Registering file "/usr/lib/vmware/symvers/vmnet-4.15.0-2-amd64".
2018-04-23T20:11:57.404+04:30| vthread-1| I125: "/usr/lib/vmware-installer/2.1.0/vmware-installer" exited with status 0.
我尝试用谷歌搜索但无法找到相关帖子。
答案1
手头的问题
您报告无法在 Kali Linux 上运行 VMware。根据您发布的错误,您的操作系统缺少运行所需的 VMware 模块。
我想借此机会指出 Kali Linux 并不是一个通用操作系统。使用不是为 Kali Linux 设计的软件时,您可能会继续遇到此类错误。运行虚拟化或管理程序软件并不是 Kali Linux 的预期功能。解决您的问题的一种可能的解决方案是在 Ubuntu、Debian 或任何其他通用操作系统上运行虚拟化软件。
如果您希望继续使用 Kali Linux 或在不同的操作系统中遇到相同的错误,以下步骤可能可以解决上述错误。
可能的解决方案
我将参考这个帖子因为它包含一些不同的可能修复。
首先尝试运行此命令:
sudo vmware-modconfig --console --install-all
这应该安装所有 VMware 模块。您现在应该能够按预期运行 Vmware。查看此 VMware 论坛帖子因为它们涵盖了您可能需要运行来验证安装过程的其他脚本。
或者,您可以先尝试此操作:
sudo apt-get install build-essential linux-headers-$(uname -r) open-vm-dkms
sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h
之后运行:sudo vmware-config-tools.pl
.sudo vmware-modconfig --console --install-all
完成后可能需要再次运行。
从头开始
您可能需要重新安装 VMware。通过运行清除现有安装sudo vmware-installer -u vmware-player
。然后重新运行安装程序脚本,即:./VMware-*.bundle.
我还将验证您的图形驱动程序和系统的所有其他部分是否完全是最新的。
结论
再次,我建议您使用与 Kali Linux 不同的操作系统来完成此任务。请仔细阅读这个帖子在进行可能的修复之前先完整地了解一下。请记住,您需要为内核安装正确的内核头文件才能使其正常工作。我还包括一个链接到在 Kali Linux 上安装 VMware 的指南。该帖子中甚至还有一些关于如何进一步解决该问题的评论。
我还包括一个Kali Linux 官方文档链接关于如何安装 VMware 工具以及另一个堆栈交换帖子的链接这似乎与这个问题有关。
如果对本回答有任何疑问,请评论。我感谢您对任何误解的纠正以及有关如何改进我的帖子的反馈。祝你好运!
答案2
以下解决方案在 Fedora32 上对我有用
我有VMware-Workstation-Full-15.5.6-16341506.x86_64.bundle并使用以下命令:
git clone https://github.com/mkubecek/vmware-host-modules
cd vmware-host-modules
git checkout workstation-15.5.6
sudo make ; sudo make install