问题

Ubuntu 20.04下启动虚拟机VMware时,报错:Before you can run VMware several modules must be compiled and loaded into the running kernel. 按提示点击install无法解决。

解决办法

1 下载vmware-host-modules并切换到对应分支

git clone https://github.com/mkubecek/vmware-host-modules
cd vmware-host-modules
git checkout workstation-16.1.2 #这里16.1.2替换为你的VM版本

这里如果直接执行sudo make & sudo make install会报以下错误:

   67 |    ASSERT_ON_COMPILE(sizeof(Selector) == 2 &&                                \|                      ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~68 |                      ((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \|                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~69 |                       sizeof(expr) <= 2))|                       ~~~~~~~~~~~~~~~~~~

2. 编辑vm_asm_x86.h

编辑vmware-host-modules/vmmon-only/include/vm_asm_x86.h
将第65行附近的以下内容:

#ifndef USE_UBSAN
#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)                                \ASSERT_ON_COMPILE(sizeof(Selector) == 2 &&                                \((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \sizeof(expr) <= 2))
#else
#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)
#endif

修改为(注释其它,只保留#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)这一行):

// #ifndef USE_UBSAN
// #define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)                                \
//    ASSERT_ON_COMPILE(sizeof(Selector) == 2 &&                                \
//                      ((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \
//                       sizeof(expr) <= 2))
// #else
#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)
// #endif

3. make & make install

然后再执行:

sudo make
sudo make install

最后,便可成功启动VM.

参考链接:

  • 参考链接

VM报错Before you can run VMware several modules must be compiled and loaded into the running kernel相关推荐

  1. 解决:Before you can run Vmware, several modules must be compiled and loaded into the running kernel

    一.问题 详情见博客Ubuntu软件非Deepin安装(Typora.微信.Anaconda.有道词典.VMware) 在Ubuntu系统中安装VMware,图标成功显示在程序中,但是打开进行Inst ...

  2. Before you can run VMware, several modules must be compiled and loaded into the running kernel.

    Before you can run VMware, several modules must be compiled and loaded into the running kernel. 问题复现 ...

  3. 创建工作站vmware workstation时,提示before you can run vmware several modules must be compiled

    安装vmware并打开vmware station时提示 before you can run vmware several modules must be compiled and loaded i ...

  4. before you can run vmware several modules must be compiled VMware Station 启动报错

    我使用的系统是deepin 20 beta 但安装完成之后,总是before you can run vmware several modules must be compiled,然后找到一个git ...

  5. 报错解决:Before you can run VMware, several modules must be compiled and ...(更換內核)

    目录 问题描述 错误分析 解决过程 问题描述 此時的基本環境: ubuntu2020 gcc 9.3 VMware 16.1.0 內核版本5.8.x 问题的起源还是来自一次内核删除失败的经历-,因为需 ...

  6. 报错解决:Before you can run VMware, several modules must be compiled ...

    before you can run vmware several modules must be complied kernel headers for version were not found ...

  7. Fedora 35安装 VMware Workstation 16.1.2并解决报错:efore you can run VMware several modules must be compiled

    参考链接: https://ericclose.github.io/install-VMware-Workstation-on-Fedora-30.html

  8. elasticsearch安装和配置,elasticsearch启动报错:can not run elasticsearch as root

    elasticsearch安装和配置 elasticsearch启动报错:can not run elasticsearch as root elasticsearch启动报错:ERROR: [3] ...

  9. MTPuTTY报错:Unable to run PuTTY 系统找不到指定的文件

    问题描述: 在前几天移动了PuTTY路径后,打开MTPuTTY时遇到报错:Unable to run PuTTY 系统找不到指定的文件 显然是PuTTY文件路径问题 解决方案: 左上角 Tools-& ...

最新文章

  1. wincc vbs mysql_Wincc VBS操作txt及SQL2005
  2. Exchange 2003 迁移至 Exchange 2010 完全攻略(二)
  3. TFS中的迭代(五)
  4. 数据结构实验四 排序算法的实现
  5. 机器学习笔记II: 决策树
  6. UVA10696 f91【数学函数+打表】
  7. Python 下的 lambda 算子
  8. window添加右键菜单
  9. Airtool 2 for Mac(Wi-Fi流量捕获工具)支持m1
  10. Mysql 设置问题,当使用一些开源的软件动态安装MYSQL数据库后,发现里面的中文全是乱码。...
  11. pythonappium环境搭建_python+appium 环境搭建
  12. nas 和 远程文件夹同步_我应该如何使用Qsync来同步我计算机和NAS上的档案?
  13. Context-Transformer: Tackling Object Confusion for Few-Shot Detection(AAAI20)
  14. 数据治理:数据治理之道-数据文化-数据思维融入企业文化
  15. Qt ERROR : The inferior stopped because it received a signal from the operating system.
  16. 如何正确地给固态硬盘(SSD)分区
  17. 鸢尾花分类算法——机器学习笔记
  18. 安装原始设备制造商 USB 驱动程序
  19. 2012-04-28
  20. 得了选择恐惧症?这款APP能解救你

热门文章

  1. uni-app中使用扩展组件失效并指导使用示例
  2. Linux、FreeBSD、Solaris三大系统内核比较
  3. 13级计算机商务沟通与礼仪结课论文,计算机组装和维护结课论文
  4. W3 D2 二维数组及案例
  5. 【正点原子Linux连载】第四十三章 Linux设备树 -摘自【正点原子】I.MX6U嵌入式Linux驱动开发指南V1.0
  6. 微信小程序我来运动健身系统
  7. Codeforces Round #481 (Div. 3) F. Mentors 思维
  8. 华为服务器cpu位置,服务器主机cpu在哪里
  9. gitlab 界面 进行偏好 设置步骤
  10. 假如爱过的人,可以遗忘