如你有遇到如下錯(cuò)誤,而無(wú)法打開Centos 上的VMware.
before you can run vmware several modules must be complied
kernel headers for version were not found if you
C header files matching your running kernel were not found.? Refer to your distribution's documentation for installation instruction。
此法肯定有效。網(wǎng)卡說(shuō)??yum groupinstall -y gcc kernel-devel 或者 ln s 的方法都是無(wú)用的。 此方法也能解決linux/usr/src/kernels 目錄下沒(méi)有內(nèi)核源碼問(wèn)題。
1.安裝gcc?
yum -y install gcc
2.復(fù)制 centosISO鏡像(與本機(jī)系統(tǒng)版本一致) 至centos系統(tǒng) 圖形狀態(tài)下打開/掛載。找到內(nèi)核相關(guān)文件,為方便,我直接輸出包名至/ker.txt??
find ./ -name? "ker*"? > /ker.txt??

然后安裝包。
yum install -y kernel-devel-3.10.0-1160.el7.x86_64.rpm
yum install -y kernel-tools-libs-3.10.0-1160.el7.x86_64.rpm
yum install -y kernel-3.10.0-1160.el7.x86_64.rpm
yum install -y kernel-abi-whitelists-3.10.0-1160.el7.noarch.rpm
yum install -y kernel-debug-devel-3.10.0-1160.el7.x86_64.rpm
yum install -y kernel-tools-3.10.0-1160.el7.x86_64.rpm
yum install -y kernel-headers-3.10.0-1160.el7.x86_64.rpm
打開虛擬機(jī),問(wèn)題解決。
