vmplayer 无法在 Ubuntu 15.10 上构建

vmplayer 无法在 Ubuntu 15.10 上构建

我已经安装了 Ubuntu 15.10,然后以 root 身份使用 vmware 64 位。我已经尝试通过 vmware 安装程序重新安装。

当我启动 vmplayer

Failed to build vmnet.  Failed to execute the build command.
Starting VMware services:
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Blocking file system                                                done
   Virtual ethernet                                                    failed
   VMware Authentication Daemon                                        done

当我构建时出现以下错误(见下文)

tmp/modconfig-RTj6zp/vmnet-only/driver.c:1239:20: error: ‘struct file’ has no member named ‘f_dentry’

有什么想法吗?我试过:

$ sudo vmware-modconfig --console --install-all

Stopping VMware services:
   VMware Authentication Daemon                                        done
   VM communication interface socket family                            done
   Virtual machine communication interface                             done
   Virtual machine monitor                                             done
   Blocking file system                                                done
make: Entering directory '/tmp/modconfig-RTj6zp/vmmon-only'
Using 2.6.x kernel build system.
/usr/bin/make -C /lib/modules/4.2.0-17-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-4.2.0-17-generic'
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/common/task.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/common/hashFunc.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-RTj6zp/vmmon-only/vmcore/moduleloop.o
/tmp/modconfig-RTj6zp/vmmon-only/linux/driver.c:1342:1: warning: always_inline function might not be inlinable [-Wattributes]
 LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
 ^
  LD [M]  /tmp/modconfig-RTj6zp/vmmon-only/vmmon.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/modconfig-RTj6zp/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/modconfig-RTj6zp/vmmon-only/vmmon.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-17-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-RTj6zp/vmmon-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-RTj6zp/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory '/tmp/modconfig-RTj6zp/vmmon-only'
make: Entering directory '/tmp/modconfig-RTj6zp/vmnet-only'
Using 2.6.x kernel build system.
/usr/bin/make -C /lib/modules/4.2.0-17-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-4.2.0-17-generic'
  CC [M]  /tmp/modconfig-RTj6zp/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-RTj6zp/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-RTj6zp/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-RTj6zp/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-RTj6zp/vmnet-only/filter.o
  CC [M]  /tmp/modconfig-RTj6zp/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-RTj6zp/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-RTj6zp/vmnet-only/netif.o
In file included from /tmp/modconfig-RTj6zp/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-RTj6zp/vmnet-only/filter.c:48:
/tmp/modconfig-RTj6zp/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)
 ^
In file included from include/linux/kernel.h:13:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/filter.c:20:
include/linux/printk.h:105:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "
 ^
/tmp/modconfig-RTj6zp/vmnet-only/filter.c:207:1: error: conflicting types for ‘VNetFilterHookFn’
 VNetFilterHookFn(const struct nf_hook_ops *ops,        // IN:
 ^
/tmp/modconfig-RTj6zp/vmnet-only/filter.c:64:18: note: previous declaration of ‘VNetFilterHookFn’ was here
 static nf_hookfn VNetFilterHookFn;
                  ^
In file included from /tmp/modconfig-RTj6zp/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-RTj6zp/vmnet-only/smac_compat.c:53:
/tmp/modconfig-RTj6zp/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)
 ^
In file included from include/linux/kernel.h:13:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/smac_compat.c:33:
include/linux/printk.h:105:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "
 ^
/tmp/modconfig-RTj6zp/vmnet-only/filter.c:64:18: warning: ‘VNetFilterHookFn’ used but never defined
/tmp/modconfig-RTj6zp/vmnet-only/filter.c:207:1: warning: ‘VNetFilterHookFn’ defined but not used [-Wunused-function]
 VNetFilterHookFn(const struct nf_hook_ops *ops,        // IN:
 ^
In file included from /tmp/modconfig-RTj6zp/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-RTj6zp/vmnet-only/driver.c:51:
/tmp/modconfig-RTj6zp/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)
 ^
In file included from include/linux/kernel.h:13:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/driver.c:23:
include/linux/printk.h:105:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "
 ^
In file included from /tmp/modconfig-RTj6zp/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-RTj6zp/vmnet-only/procfs.c:43:
/tmp/modconfig-RTj6zp/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)
 ^
In file included from include/linux/kernel.h:13:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/procfs.c:23:
include/linux/printk.h:105:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "
 ^
scripts/Makefile.build:258: recipe for target '/tmp/modconfig-RTj6zp/vmnet-only/filter.o' failed
make[2]: *** [/tmp/modconfig-RTj6zp/vmnet-only/filter.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /tmp/modconfig-RTj6zp/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-RTj6zp/vmnet-only/hub.c:43:
/tmp/modconfig-RTj6zp/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)
 ^
In file included from include/linux/kernel.h:13:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/hub.c:23:
include/linux/printk.h:105:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "
 ^
/tmp/modconfig-RTj6zp/vmnet-only/driver.c: In function ‘VNetFileOpUnlockedIoctl’:
/tmp/modconfig-RTj6zp/vmnet-only/driver.c:1239:20: <b>error: ‘struct file’ has no member named ‘f_dentry’</b>
    if (filp && filp->f_dentry) {
                    ^
/tmp/modconfig-RTj6zp/vmnet-only/driver.c:1240:19: error: ‘struct file’ has no member named ‘f_dentry’
       inode = filp->f_dentry->d_inode;
                   ^
In file included from /tmp/modconfig-RTj6zp/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-RTj6zp/vmnet-only/userif.c:45:
/tmp/modconfig-RTj6zp/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)
 ^
In file included from include/linux/kernel.h:13:0,
                 from include/linux/list.h:8,
                 from include/linux/wait.h:6,
                 from include/linux/fs.h:6,
                 from include/linux/highmem.h:4,
                 from /tmp/modconfig-RTj6zp/vmnet-only/userif.c:26:
include/linux/printk.h:105:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "
 ^
/tmp/modconfig-RTj6zp/vmnet-only/userif.c: In function ‘VNetCopyDatagram’:
/tmp/modconfig-RTj6zp/vmnet-only/userif.c:526:11: error: implicit declaration of function ‘skb_copy_datagram_iovec’ [-Werror=implicit-function-declaration]
    return skb_copy_datagram_iovec(skb, 0, &iov, len);
           ^
In file included from /tmp/modconfig-RTj6zp/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-RTj6zp/vmnet-only/netif.c:42:
/tmp/modconfig-RTj6zp/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)
 ^
In file included from include/linux/kernel.h:13:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/netif.c:23:
include/linux/printk.h:105:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "
 ^
scripts/Makefile.build:258: recipe for target '/tmp/modconfig-RTj6zp/vmnet-only/driver.o' failed
make[2]: *** [/tmp/modconfig-RTj6zp/vmnet-only/driver.o] Error 1
In file included from include/linux/pci.h:35:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/compat_netdevice.h:27,
                 from /tmp/modconfig-RTj6zp/vmnet-only/netif.c:43:
include/linux/pci_ids.h:2252:0: warning: "PCI_VENDOR_ID_VMWARE" redefined
 #define PCI_VENDOR_ID_VMWARE  0x15ad
 ^
In file included from /tmp/modconfig-RTj6zp/vmnet-only/net.h:38:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:26,
                 from /tmp/modconfig-RTj6zp/vmnet-only/netif.c:42:
/tmp/modconfig-RTj6zp/vmnet-only/vm_device_version.h:56:0: note: this is the location of the previous definition
 #define PCI_VENDOR_ID_VMWARE                    0x15AD
 ^
/tmp/modconfig-RTj6zp/vmnet-only/netif.c: In function ‘VNetNetIf_Create’:
/tmp/modconfig-RTj6zp/vmnet-only/netif.c:152:64: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
    dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);
                                                                ^
/tmp/modconfig-RTj6zp/vmnet-only/netif.c:152:10: error: ‘alloc_netdev’ undeclared (first use in this function)
    dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);
          ^
/tmp/modconfig-RTj6zp/vmnet-only/netif.c:152:10: note: each undeclared identifier is reported only once for each function it appears in
/tmp/modconfig-RTj6zp/vmnet-only/netif.c: At top level:
/tmp/modconfig-RTj6zp/vmnet-only/netif.c:85:1: warning: ‘VNetNetIfSetup’ defined but not used [-Wunused-function]
 VNetNetIfSetup(struct net_device *dev)  // IN:
 ^
scripts/Makefile.build:258: recipe for target '/tmp/modconfig-RTj6zp/vmnet-only/netif.o' failed
make[2]: *** [/tmp/modconfig-RTj6zp/vmnet-only/netif.o] Error 1
In file included from /tmp/modconfig-RTj6zp/vmnet-only/monitorAction_exported.h:31:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnet.h:29,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:24,
                 from /tmp/modconfig-RTj6zp/vmnet-only/bridge.c:52:
/tmp/modconfig-RTj6zp/vmnet-only/vm_assert.h:259:0: warning: "DEPRECATED" redefined
    #define DEPRECATED(_fix) do {} while (0)
 ^
In file included from include/linux/kernel.h:13:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/bridge.c:23:
include/linux/printk.h:105:0: note: this is the location of the previous definition
 #define DEPRECATED "[Deprecated]: "
 ^
In file included from /tmp/modconfig-RTj6zp/vmnet-only/net.h:38:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/vnetInt.h:26,
                 from /tmp/modconfig-RTj6zp/vmnet-only/bridge.c:52:
/tmp/modconfig-RTj6zp/vmnet-only/vm_device_version.h:56:0: warning: "PCI_VENDOR_ID_VMWARE" redefined
 #define PCI_VENDOR_ID_VMWARE                    0x15AD
 ^
In file included from include/linux/pci.h:35:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/compat_netdevice.h:27,
                 from /tmp/modconfig-RTj6zp/vmnet-only/bridge.c:51:
include/linux/pci_ids.h:2252:0: note: this is the location of the previous definition
 #define PCI_VENDOR_ID_VMWARE  0x15ad
 ^
In file included from /tmp/modconfig-RTj6zp/vmnet-only/bridge.c:50:0:
/tmp/modconfig-RTj6zp/vmnet-only/bridge.c: In function ‘VNetBridgeUp’:
/tmp/modconfig-RTj6zp/vmnet-only/vmnetInt.h:81:40: error: too few arguments to function ‘sk_alloc’
 #   define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \
                                        ^
/tmp/modconfig-RTj6zp/vmnet-only/bridge.c:952:17: note: in expansion of macro ‘compat_sk_alloc’
    bridge->sk = compat_sk_alloc(bridge, GFP_ATOMIC);
                 ^
In file included from /tmp/modconfig-RTj6zp/vmnet-only/compat_sock.h:23:0,
                 from /tmp/modconfig-RTj6zp/vmnet-only/bridge.c:35:
include/net/sock.h:1515:14: note: declared here
 struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
              ^
scripts/Makefile.build:258: recipe for target '/tmp/modconfig-RTj6zp/vmnet-only/bridge.o' failed
make[2]: *** [/tmp/modconfig-RTj6zp/vmnet-only/bridge.o] Error 1
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/tmp/modconfig-RTj6zp/vmnet-only/userif.o' failed
make[2]: *** [/tmp/modconfig-RTj6zp/vmnet-only/userif.o] Error 1
Makefile:1398: recipe for target '_module_/tmp/modconfig-RTj6zp/vmnet-only' failed
make[1]: *** [_module_/tmp/modconfig-RTj6zp/vmnet-only] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-17-generic'
Makefile:130: recipe for target 'vmnet.ko' failed
make: *** [vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-RTj6zp/vmnet-only'
Unable to install all modules.  See log for details.

答案1

在我看来,这似乎是 VMware 尚未针对最新内核更新其软件的情况,因此完全有可能无法在此版本下构建。此外,它似乎依赖不再“常见”的功能。

网上可能有补丁,但是你以后会面临一些麻烦。我会联系 VMware 看看他们目前是否有解决方案,因为现在我们能做的不多……

答案2

VMPlayer 7 存在补丁问题,如这个答案,并且当前版本 VMPlayer 12 有一个错误,这个答案

我建议您从 vmware.com 下载当前的 VMPlayer,并修改包装文件以便 vmplayer 可以执行:

打开终端窗口ctrl++ altt然后输入以下命令

sudo nano /usr/bin/vmplayer

向下滚动几行,找到一行内容set -e

输入新行:

export LD_LIBRARY_PATH=/usr/lib/vmware/lib/libglibmm-2.4.so.1/:$LD_LIBRARY_PATH

ctrl+octrl+x保存并退出,然后您就可以开始了。

相关内容