如你有遇到如下错误,而无法打开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。
此法肯定有效。网卡说 yum groupinstall -y gcc kernel-devel 或者 ln s 的方法都是无用的。 此方法也能解决linux/usr/src/kernels 目录下没有内核源码问题。
1.安装gcc
yum -y install gcc
2.复制 centosISO镜像(与本机系统版本一致) 至centos系统 图形状态下打开/挂载。找到内核相关文件,为方便,我直接输出包名至/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
打开虚拟机,问题解决。