Why can't I find kernel headers on CentOS 7 when trying to install VirtualBox Guest Additions?
I have a minimal CentOS 7 installation as a VirtualBox 5.0.16 r105871 guest on a Windows 8.1 host. uname -r
reports "3.10.0-327.10.1.el7.x86_64".
When I try to run VBoxLinuxAdditions.run
I get an error that "The headers for the current running kernel were not found" and suggesting I do yum install kernel-devel-3.10.0-327.10.1.el7.x86_64
. Yet yum list kernel-devel
shows that is already installed (as is kernel-headers
and the appropriate version).
Adding some logging to vboxadd
, I find that it is looking for headers in /lib/modules/3.10.0-327.10.1.el7.x86_64/build
which turns out to be a dead link to a missing /usr/src/kernels/3.10.0-327.10.1.el7.x86_64
. Indeed, /usr/src/kernels/
is empty.
Googling around suggests that many versions of CentOS require patches to VBGA for the installation to work but I don't see any such notes specific to CentOS 7 or that refer to missing kernel headers.
centos kernel virtualbox
add a comment |
I have a minimal CentOS 7 installation as a VirtualBox 5.0.16 r105871 guest on a Windows 8.1 host. uname -r
reports "3.10.0-327.10.1.el7.x86_64".
When I try to run VBoxLinuxAdditions.run
I get an error that "The headers for the current running kernel were not found" and suggesting I do yum install kernel-devel-3.10.0-327.10.1.el7.x86_64
. Yet yum list kernel-devel
shows that is already installed (as is kernel-headers
and the appropriate version).
Adding some logging to vboxadd
, I find that it is looking for headers in /lib/modules/3.10.0-327.10.1.el7.x86_64/build
which turns out to be a dead link to a missing /usr/src/kernels/3.10.0-327.10.1.el7.x86_64
. Indeed, /usr/src/kernels/
is empty.
Googling around suggests that many versions of CentOS require patches to VBGA for the installation to work but I don't see any such notes specific to CentOS 7 or that refer to missing kernel headers.
centos kernel virtualbox
add a comment |
I have a minimal CentOS 7 installation as a VirtualBox 5.0.16 r105871 guest on a Windows 8.1 host. uname -r
reports "3.10.0-327.10.1.el7.x86_64".
When I try to run VBoxLinuxAdditions.run
I get an error that "The headers for the current running kernel were not found" and suggesting I do yum install kernel-devel-3.10.0-327.10.1.el7.x86_64
. Yet yum list kernel-devel
shows that is already installed (as is kernel-headers
and the appropriate version).
Adding some logging to vboxadd
, I find that it is looking for headers in /lib/modules/3.10.0-327.10.1.el7.x86_64/build
which turns out to be a dead link to a missing /usr/src/kernels/3.10.0-327.10.1.el7.x86_64
. Indeed, /usr/src/kernels/
is empty.
Googling around suggests that many versions of CentOS require patches to VBGA for the installation to work but I don't see any such notes specific to CentOS 7 or that refer to missing kernel headers.
centos kernel virtualbox
I have a minimal CentOS 7 installation as a VirtualBox 5.0.16 r105871 guest on a Windows 8.1 host. uname -r
reports "3.10.0-327.10.1.el7.x86_64".
When I try to run VBoxLinuxAdditions.run
I get an error that "The headers for the current running kernel were not found" and suggesting I do yum install kernel-devel-3.10.0-327.10.1.el7.x86_64
. Yet yum list kernel-devel
shows that is already installed (as is kernel-headers
and the appropriate version).
Adding some logging to vboxadd
, I find that it is looking for headers in /lib/modules/3.10.0-327.10.1.el7.x86_64/build
which turns out to be a dead link to a missing /usr/src/kernels/3.10.0-327.10.1.el7.x86_64
. Indeed, /usr/src/kernels/
is empty.
Googling around suggests that many versions of CentOS require patches to VBGA for the installation to work but I don't see any such notes specific to CentOS 7 or that refer to missing kernel headers.
centos kernel virtualbox
centos kernel virtualbox
edited Mar 28 '16 at 15:04
Chris Nelson
asked Mar 28 '16 at 14:54
Chris NelsonChris Nelson
141116
141116
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Prompted by https://serverfault.com/questions/613256/trying-to-remove-packages-with-yum-however-it-is-failing I did some clean up then yum list
no longer showed kenel-devel
so I installed it and /usr/src/kernels/
is no longer empty and installing the Guest Additions succeeds.
add a comment |
Mount VirtualBox Guest Additions drive: From device menu click on Install VirtualBox guest additions option and type the following command
yum install -y linux-headers-$(uname -r)
Copy the VBoxLinuxAdditions.run
file from the drive to the root directory using following command:
cp /media/cd-rom/VBoxLinuxAdditions.run /root/
Make it executable and install it:
chmod 755 /root/VBoxLinuxAdditions.run
cd /root/Desktop
./VBoxLinuxAdditions.run
Reboot
add a comment |
By the way, now for CentOS 7, open-vm-tools
is recommended officially.
$ ./vmware-install.pl
open-vm-tools packages are available from the OS vendor and VMware recommends using open-vm-tools packages. See http://kb.vmwaare.com/kb/2073803 for mroe information.
Do you still want to proceed with this installation? [yes]
add a comment |
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f272638%2fwhy-cant-i-find-kernel-headers-on-centos-7-when-trying-to-install-virtualbox-gu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Prompted by https://serverfault.com/questions/613256/trying-to-remove-packages-with-yum-however-it-is-failing I did some clean up then yum list
no longer showed kenel-devel
so I installed it and /usr/src/kernels/
is no longer empty and installing the Guest Additions succeeds.
add a comment |
Prompted by https://serverfault.com/questions/613256/trying-to-remove-packages-with-yum-however-it-is-failing I did some clean up then yum list
no longer showed kenel-devel
so I installed it and /usr/src/kernels/
is no longer empty and installing the Guest Additions succeeds.
add a comment |
Prompted by https://serverfault.com/questions/613256/trying-to-remove-packages-with-yum-however-it-is-failing I did some clean up then yum list
no longer showed kenel-devel
so I installed it and /usr/src/kernels/
is no longer empty and installing the Guest Additions succeeds.
Prompted by https://serverfault.com/questions/613256/trying-to-remove-packages-with-yum-however-it-is-failing I did some clean up then yum list
no longer showed kenel-devel
so I installed it and /usr/src/kernels/
is no longer empty and installing the Guest Additions succeeds.
edited Apr 13 '17 at 12:13
Community♦
1
1
answered Mar 28 '16 at 16:17
Chris NelsonChris Nelson
141116
141116
add a comment |
add a comment |
Mount VirtualBox Guest Additions drive: From device menu click on Install VirtualBox guest additions option and type the following command
yum install -y linux-headers-$(uname -r)
Copy the VBoxLinuxAdditions.run
file from the drive to the root directory using following command:
cp /media/cd-rom/VBoxLinuxAdditions.run /root/
Make it executable and install it:
chmod 755 /root/VBoxLinuxAdditions.run
cd /root/Desktop
./VBoxLinuxAdditions.run
Reboot
add a comment |
Mount VirtualBox Guest Additions drive: From device menu click on Install VirtualBox guest additions option and type the following command
yum install -y linux-headers-$(uname -r)
Copy the VBoxLinuxAdditions.run
file from the drive to the root directory using following command:
cp /media/cd-rom/VBoxLinuxAdditions.run /root/
Make it executable and install it:
chmod 755 /root/VBoxLinuxAdditions.run
cd /root/Desktop
./VBoxLinuxAdditions.run
Reboot
add a comment |
Mount VirtualBox Guest Additions drive: From device menu click on Install VirtualBox guest additions option and type the following command
yum install -y linux-headers-$(uname -r)
Copy the VBoxLinuxAdditions.run
file from the drive to the root directory using following command:
cp /media/cd-rom/VBoxLinuxAdditions.run /root/
Make it executable and install it:
chmod 755 /root/VBoxLinuxAdditions.run
cd /root/Desktop
./VBoxLinuxAdditions.run
Reboot
Mount VirtualBox Guest Additions drive: From device menu click on Install VirtualBox guest additions option and type the following command
yum install -y linux-headers-$(uname -r)
Copy the VBoxLinuxAdditions.run
file from the drive to the root directory using following command:
cp /media/cd-rom/VBoxLinuxAdditions.run /root/
Make it executable and install it:
chmod 755 /root/VBoxLinuxAdditions.run
cd /root/Desktop
./VBoxLinuxAdditions.run
Reboot
answered Mar 28 '16 at 16:20
GAD3RGAD3R
27.8k1958114
27.8k1958114
add a comment |
add a comment |
By the way, now for CentOS 7, open-vm-tools
is recommended officially.
$ ./vmware-install.pl
open-vm-tools packages are available from the OS vendor and VMware recommends using open-vm-tools packages. See http://kb.vmwaare.com/kb/2073803 for mroe information.
Do you still want to proceed with this installation? [yes]
add a comment |
By the way, now for CentOS 7, open-vm-tools
is recommended officially.
$ ./vmware-install.pl
open-vm-tools packages are available from the OS vendor and VMware recommends using open-vm-tools packages. See http://kb.vmwaare.com/kb/2073803 for mroe information.
Do you still want to proceed with this installation? [yes]
add a comment |
By the way, now for CentOS 7, open-vm-tools
is recommended officially.
$ ./vmware-install.pl
open-vm-tools packages are available from the OS vendor and VMware recommends using open-vm-tools packages. See http://kb.vmwaare.com/kb/2073803 for mroe information.
Do you still want to proceed with this installation? [yes]
By the way, now for CentOS 7, open-vm-tools
is recommended officially.
$ ./vmware-install.pl
open-vm-tools packages are available from the OS vendor and VMware recommends using open-vm-tools packages. See http://kb.vmwaare.com/kb/2073803 for mroe information.
Do you still want to proceed with this installation? [yes]
answered Mar 7 at 22:16
WesternGunWesternGun
156110
156110
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f272638%2fwhy-cant-i-find-kernel-headers-on-centos-7-when-trying-to-install-virtualbox-gu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown