2

I have centos 6.6 installed on virtualbox. In order to use features like copy/paste, being able to share folders, etc, I need to install Guest additions on it.

I've clicked Device -> Insert Guest Additions CD Image and then doing the following:

enter image description here

However, when I try to run ./VBoxLinuxAdditions run I get the errors below. I am pasting screenshots because I'm not able to copy/paste since I don't have guest addition.

Error:

enter image description here

Logs:

enter image description here

The /lib/modules/2.6.32-504.e16.x86_64/build and /lib/modules/2.6.32-504.e16.x86_64/source folders are both present.

enter image description here

When I do yum remove kernel-devel and install it again using yum install kernel-devel this is the version that tries to install. Note that it is 2.6.32-573.18.1.e16

enter image description here

What I've done

Following This answer I did sudo yum install "kernel-devel-uname-r == $(uname -r)" which doesn't work

enter image description here

2
  • No solution but a question. You*re saying that you downloaded VBoxGuestAdditions_4.3.14_RC1.iso and are using this. But in the first screenshot above the version number 5.0.14 is displayed. What is more, it would help if you print the output of uname -a (although you already printed this 'indirectly').
    – mnille
    Commented Mar 21, 2016 at 10:22
  • Thats a good catch. And honestly I don't know why it is saying 5.0.14. I mounted VBoxGuestAdditions_4.3.14_RC1.iso and thats the only guest additions iso I have on my host. As for the uname -a this is what is the output 2.6.32-504.e16.x86_64 Commented Mar 21, 2016 at 10:33

2 Answers 2

1

Your ls -al /lib/modules/2.6.32-504.el6.x86_64/ command output indicated that the /lib/modules/2.6.32-504.el6.x86_64/source is actually a symbolic link to the build directory at the same level of the directory tree. Furthermore, the symbolic link is displayed in red, indicating that the link is broken, and the link target display (-> build) has a red background, indicating that the link target does not actually exist.

You also seem to have a newer kernel version 2.6.32-573.18.1.el6.x86_64 installed, but not running yet. Although you will usually have multiple kernel versions installed in parallel, the same does not apply to the kernel-devel package: it normally tracks the newest distribution kernel you have installed.

My guess is that as 2.6.32-573.18.1.el6.x86_64 kernel version was installed, the kernel-devel package also got updated to match it. After a reboot, you would be running that kernel version instead of your current one, and then you could again successfully build third-party kernel modules, like the modules of the VirtualBox Guest Additions.

The answer you linked uses the kernel-devel-uname-r == $(uname -r) syntax which was apparently "a stupid hack" according to Thorsten Leemhuis, and may have become obsolete somewhere between Fedora 19 and Fedora 21.

0

Instead of using an ISO, can you not just install the Guest Additions using the "Devices" tab, on the machine that is running?

Install Guest Additions

11
  • This is what I did. I clicked Devices -> install Guest Additions CD Image Commented Mar 21, 2016 at 10:50
  • And did that work for you? :)
    – Kevdog777
    Commented Mar 21, 2016 at 10:50
  • No. I'm assuming the steps I'm doing are required after I click Insert Guest Additions CD Image Commented Mar 21, 2016 at 10:53
  • 1
    My presumption about the ISO was incorrect. When I click insert Guest additions CD Image. I guess 5.0.14 image gets inserted and then I execute the ./VBoxLinuxAdditions run command. I've updated the question to reflect this. Commented Mar 21, 2016 at 10:58
  • I have just tried doing it as you said, in your updated question, and it is working for me. So not sure what I have that you don't have. Maybe try restarting the system, and see if that fixes the copy/paste issue? Sorry I can't be of any more assistance :)
    – Kevdog777
    Commented Mar 21, 2016 at 11:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .