vmlinux 在 Ubuntu 22.04 中不可用

vmlinux 在 Ubuntu 22.04 中不可用

尝试在 Ubuntu 22.04 上安装 vmware 模块时,似乎 vmlinux 不可用。

的简短输出sudo vmware-modconfig --console --install-all

...
Skipping BTF generation for /tmp/modconfig-EoHWe0/vmnet-only/vmnet.ko due to unavailability of vmlinux
...
Unable to install all modules.  See log for details.

以下是日志的输出。请注意,像缺少配置和首选项一样,没有设置,我将其作为空目录添加到 /usr/lib/vmware/settings 下,但没有完全帮助。我确定你们是否有这些文件或目录,以及内容是什么。

2022-06-02T14:14:04.069Z In(05) modconfig Log for VMware Workstation pid=9640 version=16.2.3 build=build-19376536 option=Release
2022-06-02T14:14:04.069Z In(05) modconfig The host is 64-bit.
2022-06-02T14:14:04.069Z In(05) modconfig Host codepage=UTF-8 encoding=UTF-8
2022-06-02T14:14:04.069Z In(05) modconfig Host is Linux 5.15.0-33-generic Ubuntu 22.04 LTS Ubuntu 22.04 LTS 22.04
2022-06-02T14:14:04.069Z In(05) modconfig Host offset from UTC is -06:00.
2022-06-02T14:14:04.068Z In(05) modconfig DictionaryLoad: "/usr/lib/vmware/settings" is a directory.
2022-06-02T14:14:04.068Z In(05) modconfig [msg.dictionary.load.isDirectory] "/usr/lib/vmware/settings" is a directory.
2022-06-02T14:14:04.068Z In(05) modconfig PREF Optional preferences file not found at /usr/lib/vmware/settings. Using default values.
2022-06-02T14:14:04.068Z In(05) modconfig DictionaryLoad: Cannot open file "/root/.vmware/config": No such file or directory.
2022-06-02T14:14:04.068Z In(05) modconfig [msg.dictionary.load.openFailed] Cannot open file "/root/.vmware/config": No such file or directory.
2022-06-02T14:14:04.068Z In(05) modconfig PREF Optional preferences file not found at /root/.vmware/config. Using default values.
2022-06-02T14:14:04.068Z In(05) modconfig DictionaryLoad: Cannot open file "/root/.vmware/preferences": No such file or directory.
2022-06-02T14:14:04.068Z In(05) modconfig [msg.dictionary.load.openFailed] Cannot open file "/root/.vmware/preferences": No such file or directory.
2022-06-02T14:14:04.068Z In(05) modconfig PREF Optional preferences file not found at /root/.vmware/preferences. Using default values.
2022-06-02T14:14:04.216Z In(05) modconfig Initialized!  Lets do this thing...
2022-06-02T14:14:04.217Z In(05) modconfig Obtaining info using the running kernel.
2022-06-02T14:14:04.217Z In(05) modconfig Created new pathsHash.
2022-06-02T14:14:04.217Z In(05) modconfig Setting header path for 5.15.0-33-generic to "/lib/modules/5.15.0-33-generic/build/include".
2022-06-02T14:14:04.217Z In(05) modconfig Validating path "/lib/modules/5.15.0-33-generic/build/include" for kernel release "5.15.0-33-generic".
2022-06-02T14:14:04.217Z In(05) modconfig using /usr/bin/gcc-11 for preprocess check
2022-06-02T14:14:04.223Z In(05) modconfig Preprocessed UTS_RELEASE, got value "5.15.0-33-generic".
2022-06-02T14:14:04.224Z In(05) modconfig The header path "/lib/modules/5.15.0-33-generic/build/include" for the kernel "5.15.0-33-generic" is valid.  Whoohoo!
2022-06-02T14:14:04.421Z In(05) modconfig found symbol version file /lib/modules/5.15.0-33-generic/build/Module.symvers
2022-06-02T14:14:04.421Z In(05) modconfig Reading symbol versions from /lib/modules/5.15.0-33-generic/build/Module.symvers.
2022-06-02T14:14:04.437Z In(05) modconfig Read 26156 symbol versions
2022-06-02T14:14:04.437Z In(05) modconfig Reading in info for the vmmon module.
2022-06-02T14:14:04.437Z In(05) modconfig Reading in info for the vmnet module.
2022-06-02T14:14:04.447Z In(05) modconfig Trying to find a suitable PBM set for kernel "5.15.0-33-generic".
2022-06-02T14:14:04.447Z In(05) modconfig No matching PBM set was found for kernel "5.15.0-33-generic".
2022-06-02T14:14:04.447Z In(05) modconfig Found compiler at "/usr/bin/gcc"
2022-06-02T14:14:04.448Z In(05) modconfig Got gcc version "11".
2022-06-02T14:14:04.448Z In(05) modconfig The GCC version matches the kernel GCC minor version like a glove.
2022-06-02T14:14:04.448Z In(05) modconfig Using temp dir "/tmp".
2022-06-02T14:14:04.557Z In(05) modconfig Setting destination path for vmmon to "/lib/modules/5.15.0-33-generic/misc/vmmon.ko".
2022-06-02T14:14:04.557Z In(05) modconfig Extracting the vmmon source from "/usr/lib/vmware/modules/source/vmmon.tar".
2022-06-02T14:14:04.561Z In(05) modconfig Successfully extracted the vmmon source.
2022-06-02T14:14:04.561Z In(05) modconfig Building module with command "/usr/bin/make -j6 -C /tmp/modconfig-FVEIxK/vmmon-only auto-build HEADER_DIR=/lib/modules/5.15.0-33-generic/build/include CC=/usr/bin/gcc IS_GCC_3=no"
2022-06-02T14:14:05.926Z Wa(03) modconfig Failed to build vmmon.  
2022-06-02T14:14:05.926Z Wa(03) modconfig Failed to execute the build command.
2022-06-02T14:14:05.926Z In(05) modconfig Setting destination path for vmnet to "/lib/modules/5.15.0-33-generic/misc/vmnet.ko".
2022-06-02T14:14:05.926Z In(05) modconfig Extracting the vmnet source from "/usr/lib/vmware/modules/source/vmnet.tar".
2022-06-02T14:14:05.932Z In(05) modconfig Successfully extracted the vmnet source.
2022-06-02T14:14:05.932Z In(05) modconfig Building module with command "/usr/bin/make -j6 -C /tmp/modconfig-FVEIxK/vmnet-only auto-build HEADER_DIR=/lib/modules/5.15.0-33-generic/build/include CC=/usr/bin/gcc IS_GCC_3=no"
2022-06-02T14:14:07.760Z In(05) modconfig Successfully built vmnet.  Module is currently at "/tmp/modconfig-FVEIxK/vmnet.o".
2022-06-02T14:14:07.760Z In(05) modconfig Found the vmnet symvers file at "/tmp/modconfig-FVEIxK/vmnet-only/Module.symvers".
2022-06-02T14:14:07.760Z In(05) modconfig Installing vmnet from /tmp/modconfig-FVEIxK/vmnet.o to /lib/modules/5.15.0-33-generic/misc/vmnet.ko.
2022-06-02T14:14:07.766Z In(05) modconfig Registering file "/lib/modules/5.15.0-33-generic/misc/vmnet.ko".
2022-06-02T14:14:08.093Z In(05) modconfig "/usr/lib/vmware-installer/3.0.0/vmware-installer" exited with status 0.
2022-06-02T14:14:08.093Z In(05) modconfig Registering file "/usr/lib/vmware/symvers/vmnet-5.15.0-33-generic".
2022-06-02T14:14:08.461Z In(05) modconfig "/usr/lib/vmware-installer/3.0.0/vmware-installer" exited with status 0.
2022-06-02T14:14:08.469Z In(05) modconfig We are now shutdown.  Ready to die!

答案1

按照以下步骤操作后https://communities.vmware.com/t5/VMware-Workstation-Pro/VM-Workstation-16-1-gt-16-2-1-on-Ubuntu-21-10-broke-everything/mp/2885203/highlight/true#M173202手动重新编译 vmmon 和 vmnet 模块,GUI 正在启动但 /dev/vmmon 不可用。

sudo vmware-modconfig --console --install-all 的简短输出

[AppLoader] GLib does not have GSettings support.
Stopping VMware services:
   VMware Authentication Daemon                                        done
   Virtual machine monitor                                             done
...
Starting VMware services:
   Virtual machine monitor                                            failed
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Virtual ethernet                                                   failed
   VMware Authentication Daemon                                        done
Unable to start services

目前,如果没有 root 用户则无法启动它。

从另一个角度看状态表明共享库存在问题:

me@myLaptop:/usr/lib/vmware/modules/source/vmnet-only$ systemctl status vmware.service 
× vmware.service - LSB: This service starts and stops VMware services
     Loaded: loaded (/etc/init.d/vmware; generated)
...
Jun 02 17:38:25 myLaptop vmware[28584]: Starting VMware services:
...
Jun 02 17:38:25 myLaptop VMware-init[28621]: /usr/sbin/vmware-authdlauncher: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such>
Jun 02 17:38:25 myLaptop systemd[1]: vmware.service: Control process exited, code=exited, status=1/FAILURE
Jun 02 17:38:25 myLaptop systemd[1]: vmware.service: Failed with result 'exit-code'.
Jun 02 17:38:25 myLaptop systemd[1]: Failed to start LSB: This service starts and stops VMware services.

执行下面两个命令可以解决上述共享库问题:

export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
sudo ldconfig

按规定https://stackoverflow.com/questions/42828083/error-while-loading-shared-libraries-usr-local-lib64-libssl-so-1-1

相关内容