Host - Windows 7
Guest - CentOS
I am trying to install kernel-headers
using yum
since during the installation of vmware-tools
I get a message asking for the path to the kernel header files for the 3.10.0-229.7.2.e17.x86_64.
Running yum install kernel-headers
returns Package kernel-headers-3.10.0-229.7.2.e17.x86_64 already installed and latest version. But the directory /usr/src/kernels
is empty.
Are the kernel headers installed somewhere else? Or should I be asking yum
to install something else?
Path provided to vmware-tools for kernel headers
Searching for a valid kernel header path...
The path "" is not a valid path to the 3.10.0-229.7.2.e17.x86_64 kernel headers.
Would you like to change it? [yes]
Providing the path /usr/include/linux
gives the same response again but with "" replaced with the path provided.
The correct package to install all of the required dependencies for building kernel modules is kernel-devel
(see the CentOS documentation for more information).
The headers are not installed in /usr/src/kernels
, rather they're installed in a number of directories below /usr/include
(the default location for C header files). You can list the contents of the kernel-headers
package you installed using:
rpm -ql kernel-headers
-
That was it. I'd got to that page earlier but misread it as "if you do need the full source use kernel-devel". Thanks – Kvothe Jul 13 '15 at 14:00
I had same problem. After much googling, this solution worked for me. It first determines the installed kernel version and then uses that exact version to install the kernel header package.
sudo yum install "kernel-devel-uname-r == $(uname -r)"
I had the same issue and the above solution did not work for me. It could be the build of CentOS 7 I am using.
Here is what solved the problem for me...
install kernel headers
yum -y install kernel-devel
set symbolic link so vmware tools can find version.h
export kernel_headers=`ls -hd /usr/src/kernels/3*`
sudo ln -s ${kernel_headers}/include/generated/uapi/linux/version.h ${kernel_headers}/include/linux/version.h
I've had exactly the same issue.
In my case i just had to remove kernel-dev* et install it again :
yum -y remove kernel-devel*
yum -y install kernel-devel*
I installed the kernel-devel package, but it turns out that the headers were for a different kernel version than the one that was running on my instance. In order to fix the problem, I ran
sudo yum upgrade
and rebooted, and then vmware-tools installed without a fuss.
On CentOS version 7 given below is the path for kernel-headers.
/lib/modules/3.10.0-327.36.2.el7.x86_64/build/include
After running yum install kernel-headers
twice (updated
to the latest), the problem got fixed. Make sure the running kernel
version and the kernel headers version are same. My kernel version is 3.10.0-327.36.2.el7.x86_64
'OS > Linux' 카테고리의 다른 글
How to Install JAVA 8 on Ubuntu 18.04/16.04, LinuxMint 18/17 (0) | 2018.05.25 |
---|---|
How to install Google Chrome web browser on Ubuntu 18.04 Bionic Beaver Linux (0) | 2018.05.25 |
Centos 7 NTFS 디스크 마운트 (0) | 2018.05.24 |
ubuntu vmware 설치에러 (0) | 2018.05.23 |
Ubuntu server problem - ssh: connect to host 192.x port 22: Connection refused (0) | 2018.05.20 |
rpm -ql kernel-headers
; I think it puts files in /usr/include/linux, but I may be out-of-date. It'd be good if you could indicate what path you give to the vmware-tools installer and also what it reports back. – Jeff Schaller Jul 13 '15 at 13:26