在Fedora21下安裝vmware報錯的解決辦法

關於VMWARE WORKSTATION在Fedora21下的安裝問題node

 

(1)在Fedora21下安裝vmware若是在終端下啓動,提示你找不到內核頭文件Kernel Headers的話使用命令:linux

 

sudo yum install kernel-devel函數

 

你的內核頭文件默認是在/usr/src/kernels下ui

使用命令後再檢查內核頭文件就應該已經存在了spa

 

 

(2)在內核頭文件存在的狀況下,若是提示報錯以下:blog

 

Stopping vmware (via systemctl):                           [  肯定  ]
make: Entering directory '/tmp/modconfig-czFWqw/vmnet-only'
Using kernel build system.
/bin/make -C /lib/modules/3.19.5-200.fc21.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/kernels/3.19.5-200.fc21.x86_64'
  CC [M]  /tmp/modconfig-czFWqw/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-czFWqw/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-czFWqw/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-czFWqw/vmnet-only/netif.o
/tmp/modconfig-czFWqw/vmnet-only/driver.c: 在函數‘VNetFileOpUnlockedIoctl’中:
/tmp/modconfig-czFWqw/vmnet-only/driver.c:1194:20: 錯誤:‘struct file’沒有名爲‘f_dentry’的成員
    if (filp && filp->f_dentry) {
                    ^
/tmp/modconfig-czFWqw/vmnet-only/driver.c:1195:19: 錯誤:‘struct file’沒有名爲‘f_dentry’的成員
       inode = filp->f_dentry->d_inode;
                   ^
/tmp/modconfig-czFWqw/vmnet-only/userif.c: 在函數‘VNetCopyDatagram’中:
/tmp/modconfig-czFWqw/vmnet-only/userif.c:526:4: 錯誤:隱式聲明函數‘skb_copy_datagram_iovec’ [-Werror=implicit-function-declaration]
    return skb_copy_datagram_iovec(skb, 0, &iov, len);
    ^
scripts/Makefile.build:257: recipe for target '/tmp/modconfig-czFWqw/vmnet-only/driver.o' failed
make[2]: *** [/tmp/modconfig-czFWqw/vmnet-only/driver.o] Error 1
make[2]: *** 正在等待未完成的任務....
In file included from include/linux/pci.h:34:0,
                 from /tmp/modconfig-czFWqw/vmnet-only/compat_netdevice.h:27,
                 from /tmp/modconfig-czFWqw/vmnet-only/netif.c:43:
include/linux/pci_ids.h:2251:0: 警告:「PCI_VENDOR_ID_VMWARE」重定義
 #define PCI_VENDOR_ID_VMWARE  0x15ad
 ^
In file included from /tmp/modconfig-czFWqw/vmnet-only/net.h:38:0,
                 from /tmp/modconfig-czFWqw/vmnet-only/vnetInt.h:26,
                 from /tmp/modconfig-czFWqw/vmnet-only/netif.c:42:
/tmp/modconfig-czFWqw/vmnet-only/vm_device_version.h:56:0: 附註:這是先前定義的位置
 #define PCI_VENDOR_ID_VMWARE                    0x15AD
 ^
cc1: some warnings being treated as errors
scripts/Makefile.build:257: recipe for target '/tmp/modconfig-czFWqw/vmnet-only/userif.o' failed
make[2]: *** [/tmp/modconfig-czFWqw/vmnet-only/userif.o] Error 1
Makefile:1386: recipe for target '_module_/tmp/modconfig-czFWqw/vmnet-only' failed
make[1]: *** [_module_/tmp/modconfig-czFWqw/vmnet-only] Error 2
make[1]: Leaving directory '/usr/src/kernels/3.19.5-200.fc21.x86_64'
Makefile:120: recipe for target 'vmnet.ko' failed
make: *** [vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-czFWqw/vmnet-only'
Starting vmware (via systemctl):  Job for vmware.service failed. See "systemctl status vmware.service" and "journalctl -xe" for details.
                                                           [失敗]                                        ip

 


即頭文件中的內容和安裝過程要求不符合的話,能夠ci

使用修復後的源碼包:get

http://pan.baidu.com/s/1hqAcYzU源碼

複製到如下目錄下覆蓋:

 

sudo cp vmnet.tar /usr/lib/vmware/modules/source

 

問題就解決了!

相關文章
相關標籤/搜索