Are you having trouble getting Guest Additions installed on your OEL 6 guest machine in VirtualBox? I had quite a time with it myself, and while I am not the first person to encounter the issue, I had to combine tips from a few places and gain some additional understanding about Oracle Enterprise Linux to get it to work.
On the desktop, you will now find a shortcut to the Guest Additions. You might be prompted to open the Autorun Prompt, do this andyou should see the Guest Additions Installation start… and fail:
You are advised to examine the log at /var/log/vboxadd-install.log to figure out the cause, which in my case the log included:
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
To resolve this you must install the kernel source which is not there by default. The Guest Additions Installation output suggests you install it via yum and even provides you the command to do so, but not so fast… if you don’t have yum configured yet that will fail too. And you will also need the gcc package for the installer to update the kernel, but don’t worry, it’s all covered below. If you are running a version of Oracle Linux other than 6, you might visit public-yum.oracle.com first to get the correct URL for the below setup, otherwise:
# yum install gcc
And now you’re good to go. Now might be a good time to configure a shared folder from your host machine, and reboot to see if it works. Shared folders will appear at /media:
If these instructions did not help you, consider the pages below that provided helpful tips as I was troubleshooting the problem:
https://blogs.oracle.com/fatbloke/entry/virtualbox_and_the_unbreakable_enterprise
http://www.oracle.com/technetwork/articles/servers-storage-admin/vmlove-1368887.html
https://blogs.oracle.com/wim/entry/setting_up_oracle_linux_6
Sou do Brasil. Valeu cara. Aqui funcionou ! Thank you
Groeten uit Vlaanderen. Works like a charm. Bedankt !
Awesome! was struggling with this.
Derrick, many thanks for posting this. It worked like a charm, but it might help others to know hat you need to eject the vbox additions media before trying the install again.
Thank you
EXCELENTISIMO!!!!! FUNCIONA A LA PERFECCION, SALUDOS DESDE EL SALVADOR CENTRO AMERICA, MUCHAS GRACIAS!!!!!
Thank you!
You are life saver. Thank you. Worked really good. And updating the the YUM messed up the OEL. So I did all the steps apart from # yum update
Unfortunately, I have tried, was still failing to install the guest additions. uname -r returns: 2.6.39-400.17.;.e;6uek.x86_64
I have ran -> yum install kernel-uek-devel. It said already installed and latest version.
Also unmounted the guest addition ISO and reran. Seems no luck.
Hi Des – did you configure the OL6 yum repo as shown above? Make sure to wget the repo before yum update or any yum installs. Just a guess…
Worked with CentOS too. Except all I need to run was ‘yum update’
you saved my ass dude, I was still looking only for standard kernel-devel instead of kernel-uek-devel, thanks a lot
Excellent. Thanks for taking the time to pull all this together.
Perfect, worked first time.
Thank you!!! It is work!
This works like a charm 🙂 Thank you.
YES! Thanks.