centos8 安装vmware需要的内核头文件 kernel-headers.
centos8 安装vmware需要的内核头文件 kernel-headers.
uname -r (查看内核版本)
rpm -qa kernel-headers (查看kernel-headers版本)
rpm -qa kernel-devel (查看kernel-devel版本)
vmware本身的安装 不絮叨 网上很多
内核安装使用
下载最新版
http://www.elrepo.org/
或
yum install https://www.elrepo.org/elrepo-release-8.0-2.el8.elrepo.noarch.rpm
如果已经安装过 kernel-headers 会报冲突错误,可 yum remvoe kernel-ml-headers 卸载
安装kernel-ml-headers 后,在重新安装gcc 时会有kernel-headers冲突
rpm -ivh kernel-headers-4.18.0-80.11.2.el8_0.x86_64.rpm --replacefiles
yum install gcc
下载centos 8 elfutils-libelf-devel
https://pkgs.org/download/elfutils-libelf-devel
rpm -ivh elfutils-libelf-devel-0.174-6.el8.x86_64.rpm
启动 VMware
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++但是第四版默认的头文件名 因为有lt版本 长支持版和 ml 主版本之分 所以有所不同
以下命令可以查看当前版本适合的 内核头文件包
yum --disablerepo="*" --enablerepo="elrepo-kernel" list|grep kernel
No metadata available for elrepo-kernel
* elrepo-kernel: hkg.mirror.rackspace.com
abrt-addon-kerneloops.x86_64 2.1.11-52.el7.centos @base
kernel-ml.x86_64 4.19.6-1.el7.elrepo @elrepo-kernel
kernel-ml-devel.x86_64 4.19.6-1.el7.elrepo @elrepo-kernel
kernel-ml-headers.x86_64 4.19.6-1.el7.elrepo @elrepo-kernel
kernel-ml-tools.x86_64 4.19.6-1.el7.elrepo @elrepo-kernel
kernel-ml-tools-libs.x86_64 4.19.6-1.el7.elrepo @elrepo-kernel
kernel-ml-tools-libs-devel.x86_64 4.19.6-1.el7.elrepo @elrepo-kernel
perf.x86_64 4.19.6-1.el7.elrepo @elrepo-kernel
kernel-lt.x86_64 4.4.166-1.el7.elrepo elrepo-kernel
kernel-lt-devel.x86_64 4.4.166-1.el7.elrepo elrepo-kernel
kernel-lt-doc.noarch 4.4.166-1.el7.elrepo elrepo-kernel
kernel-lt-headers.x86_64 4.4.166-1.el7.elrepo elrepo-kernel
kernel-lt-tools.x86_64 4.4.166-1.el7.elrepo elrepo-kernel
kernel-lt-tools-libs.x86_64 4.4.166-1.el7.elrepo elrepo-kernel
kernel-lt-tools-libs-devel.x86_64 4.4.166-1.el7.elrepo elrepo-kernel
kernel-ml-doc.noarch 4.19.6-1.el7.elrepo elrepo-kernel
python-perf.x86_64 4.19.6-1.el7.elrepo elrepo-kernel
安装其中和自己内核版本对应的包就行 比如
yum --disablerepo="*" --enablerepo="elrepo-kernel" install -y kernel-ml-tools-libs-devel-4.19.6-1.el7.elrepo.x86_64 kernel-ml-tools-4.19.6-1.el7.elrepo.x86_64 kernel-ml-devel-4.19.6-1.el7.elrepo.x86_64 kernel-ml-tools-libs-4.19.6-1.el7.elrepo.x86_64 kernel-ml-headers-4.19.6-1.el7.elrepo.x86_64