AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1041912
Accepted
Nicolas Raoul
Nicolas Raoul
Asked: 2018-05-31 02:16:45 +0800 CST2018-05-31 02:16:45 +0800 CST 2018-05-31 02:16:45 +0800 CST

在 18.04 上安装 VMware:无法构建 vmmon

  • 772

我正在尝试使用https://help.ubuntu.com/community/VMware/Player上的说明安装 VMware

我收到一个错误,告诉我查看一个日志文件,其中包含:

Extracting the vmmon source from "/usr/lib/vmware/modules/source/vmmon.tar".
Successfully extracted the vmmon source.
Building module with command "/usr/bin/make -j4 -C /tmp/modconfig-GoVdrH/vmmon-only auto-build HEADER_DIR=/lib/modules/4.15.0-22-generic/build/include CC=/usr/bin/gcc IS_GCC_3=no"
Failed to build vmmon.  Failed to execute the build command.

为了弄清楚到底出了什么问题,我vmware-modconfig --console --install-all在命令行上运行,它显示了以下错误:

./arch/x86/include/asm/processor-flags.h:39:0: note: this is the location of the previous definition
 #define CR3_PCID_MASK 0xFFFull

                      ^
/tmp/modconfig-3S1CBa/vmmon-only/linux/driver.c:256:12: error: ‘struct timer_list’ has no member named ‘data’
    tscTimer.data     = 0;
    unsigned int lockedPages = global_page_state(NR_PAGETABLE) +
                               ^~~~~~~~~~~~~~~~~
                               global_numa_state
/tmp/modconfig-3S1CBa/vmmon-only/linux/driver.c: In function ‘init_module’:
/tmp/modconfig-3S1CBa/vmmon-only/linux/driver.c:338:4: error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’? [-Werror=implicit-function-declaration]
    init_timer(&tscTimer);
    ^~~~~~~~~~
    init_timers
/tmp/modconfig-3S1CBa/vmmon-only/linux/hostif.c: In function ‘HostIF_InitUptime’:
    init_timers
/tmp/modconfig-3S1CBa/vmmon-only/linux/hostif.c:1754:31: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
    uptimeState.timer.function = HostIFUptimeResyncMono;
 LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
 ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/tmp/modconfig-3S1CBa/vmmon-only/linux/hostif.o' failed
make[2]: *** [/tmp/modconfig-3S1CBa/vmmon-only/linux/hostif.o] Error 1
Makefile:110: recipe for target 'vmmon.ko' failed
make: *** [vmmon.ko] Error 2

如何修复它,或者使隐式函数声明和不兼容指针类型不被视为错误?
或者有什么更简单的方法可以在 18.04 上安装最新的 VMware?

注意:与 Ubuntu 16.04 上的 VMWare Workstation Pro 12 不同的错误无法编译 vmmon

vmware 18.04
  • 3 3 个回答
  • 41428 Views

3 个回答

  • Voted
  1. Charly
    2018-07-05T03:51:33+08:002018-07-05T03:51:33+08:00

    我找到了一个解决方案,并根据mkucebek 的 github 源创建了一个脚本文件。

    您必须创建一个包含此内容的文件并在每次需要时运行它(通常在您安装新内核时):

    #!/bin/bash
    VMWARE_VERSION=workstation-12.5.9
    TMP_FOLDER=/tmp/patch-vmware
    rm -fdr $TMP_FOLDER
    mkdir -p $TMP_FOLDER
    cd $TMP_FOLDER
    git clone https://github.com/mkubecek/vmware-host-modules.git
    cd $TMP_FOLDER/vmware-host-modules
    git checkout $VMWARE_VERSION
    git fetch
    make
    sudo make install
    sudo rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
    sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 
    /usr/lib/vmware/lib/libz.so.1/libz.so.1
    sudo /etc/init.d/vmware restart
    

    然后,您只需启动 VMware Workstation 而无需构建模块。

    • 22
  2. Best Answer
    Michael
    2018-05-31T16:11:59+08:002018-05-31T16:11:59+08:00

    安装最新版本14.1.2。该错误已得到修复。见这里。这是下载链接。

    • 6
  3. Raul Peñaloza
    2019-06-11T07:54:02+08:002019-06-11T07:54:02+08:00
    #!/bin/bash
    VMWARE_VERSION=`vmware-installer -l |grep workstat|awk '{print $2}' |awk 'BEGIN {FS="."}{print "workstation-"$1"."$2"."$3}'`
    echo $VMWARE_VERSION
    TMP_FOLDER=/tmp/patch-vmware
    rm -fdr $TMP_FOLDER
    mkdir -p $TMP_FOLDER
    cd $TMP_FOLDER
    git clone https://github.com/mkubecek/vmware-host-modules.git
    cd $TMP_FOLDER/vmware-host-modules
    git checkout $VMWARE_VERSION
    git fetch
    make
    sudo make install
    sudo rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
    sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 
    /usr/lib/vmware/lib/libz.so.1/libz.so.1
    sudo /etc/init.d/vmware restart
    

    这适用于我在 Fedora 30 和 Workstation 15.1.0 上

    • 5

相关问题

  • VMWare Fusion 3.1 上缺少声音

  • 如何将多部分 VMDK 磁盘映像转换为 qcow2?

  • 来宾在 VMware Player 中调整 Ubuntu 10.04 64 位大小不起作用 [关闭]

  • vmware/virtualbox 3d 加速

  • 哪个更好:Win7 主机运行 VMware 和 Ubuntu 来宾,反之亦然?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve