Вы находитесь на странице: 1из 45

Install VirtualBox 4.1.6 on Fedora 16/15, CentOS/Red Hat (RHEL) 6/5.

7
Updated by JR on Nov 9, 2011 in CentOS, Desktop Guides, Featured, Fedora, Linux, Most Popular, Programs, Red Hat (RHEL) | 107 comments Do you like this? 24

Oracle VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professionalquality virtualization solution that is also Open Source Software. VirtualBox supports a large number of guest operating systems:

Windows 3.x Windows NT 4.0 Windows 2000 Windows XP Windows Server 2003 Windows Vista Windows 7 DOS Linux (2.4 and 2.6) Solaris OpenSolaris OpenBSD

This guide shows howto install VirtualBox 4.1 (currently 4.1.6) on Fedora 16, Fedora 15, Fedora 14, Fedora 13, Fedora 12, CentOS 6/5.7, Red Hat (RHEL) 6.1/6/5.7. This howto uses Virtual Box yum repositories.

1. Change to root User


su ## OR ##

sudo -i

2. Install Fedora or RHEL Repo Files


cd /etc/yum.repos.d/ ## Fedora 16/15/14/13/12 users wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo ## CentOS 6/5.7 and Red Hat (RHEL) 6/5.7 users wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

3. Update latest packages


yum update

Note: Reboot if you got kernel update.

4. Install following dependency packages


CentOS 5 and Red Hat (RHEL) 5 needs EPEL repository, install it with following command:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-54.noarch.rpm yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernelheaders kernel-devel dkms ## PAE kernel users install ## yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernelheaders kernel-PAE-devel dkms

5. Install VirtualBox Latest Version (current 4.1.6)


yum install VirtualBox-4.1

Note: This command create automatically vboxusers group and VirtualBox user must be member of that group. This command also build needed kernel modules. Rebuild kernel modules with following command:
/etc/init.d/vboxdrv setup ## OR ## service vboxdrv setup

6. Add VirtualBox User to vboxusers Group

usermod -a -G vboxusers user_name

7. Start VirtualBox
Use launcher or simply:
VirtualBox

Troubleshooting
If you have problems with KERN_DIR parameter or your kernel directory is not automatically detected then set KERN_DIR environment variable manually, using following method:
## Current running kernel on Fedora ## KERN_DIR=/usr/src/kernels/`uname -r` ## Current running kernel on CentOS and Red Hat (RHEL) ## KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` ## Fedora example ## KERN_DIR=/usr/src/kernels/2.6.33.5-124.fc13.i686 ## CentOS and Red Hat (RHEL) example ## KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64 ## Export KERN_DIR ## export KERN_DIR

Check also:
Install VirtualBox Guest Additions on Fedora, CentOS, Red Hat (RHEL) Do you like this? 24

Related posts:
1. Install VirtualBox Guest Additions on Fedora 15/14, CentOS/RHEL 6/5.7 2. Install Sun/Oracle Java JDK/JRE 7u1 on Fedora 16/15, CentOS/RHEL 6/5.7 3. Install OpenOffice 3.3.0/3.4.0 on Fedora 16/15, CentOS/RHEL 6/5.7 4. Install Sun/Oracle Java JDK/JRE 6u29 on Fedora 16/15, CentOS/RHEL 6/5.7 5. Install Memcached on Fedora 16/15, CentOS/Red Hat (RHEL) 6/5.7
107 Comments

1. ghostdawg / March 1, 2010 Thanks. I was looking for something like this and it was very helpful, since Im fairly new with using Fedora distros. Reply 2. remke / June 24, 2010 ??? Add VirtualBox User to vboxusers Group :(( . but not by using wheel group this is intended for giving admin stuff to normal users Instead: /etc/group: vboxusers:x:501:remke ->>> usermod -aG vboxusers remke Reply
o

JR / June 25, 2010 Hi remke, Thanks for correction. It was typo on commandnow this guide is updated :) Reply

3. danijelpg / July 22, 2010 Hi, Can anyone help, i cannot install VirtualBox-3.2 on CentOS 5.4 i386 . ive updated the system, installed: kernel-devel; kernel-PAE-devel; kernel-xen;kernel-xen-devel; nothing worked, always the same problem: Recompiling VirtualBox kernel module [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) Wat can i try next? Reply
o

JR / July 22, 2010

Hi danijelpg, Could you post /var/log/vbox-install.log file content here? Reply 4. dado PG MNE / July 22, 2010 Hi i am trying to install VBox-3.2.6 on CentOS 5.4 i386 i have not installed KVM i have installed Development Tools (gcc, make, automake) but i cannot install DKMS using: yum install dkms, anyone ones why??? and second, more important: when i try to install VBox i get then massage: recompiling vbox kernel module FAILED output from rpm -qa kernel\* | sort says then i have kernel-xen and when i remove it because of installing kernel-PAE-devel, after attemp to reboot, system cannot reboot. my questions are: - how to install DKMS - how to switch from kernel-xen to kernel-devel or kernel-PAE-devel any PLEASE help! Reply
o

JR / July 23, 2010 What happen when you try to install DKMS? Please post all error messages? Reply

5. ricardo / August 2, 2010 Worked like a charm for my Fedora 13 x86_64 with KDE. Thanks a lot. Reply 6. Christian Soderlund / August 27, 2010 RHEL6 does not work yet as the repo tries a directory that does not exist. However using the fedora13 version on RHEL6 works so you will need to use that repo instead (with

some manual editing of the .repo file). Maybe you could add that to the oterwise great guide! Reply
o

JR / August 29, 2010 Hi Christian, Thanks! Good point, I added this to guide. Reply

7. Charith / September 20, 2010 Can anyone to help me to install Sun virtual box in fedora 13 Reply
o

JR / September 20, 2010 Hi Charith, Did you read this blog post about Installing Sun VirtualBox 3.2.8 on Fedora 13 and did you try installing Sun VirtualBox according to the instructions? Reply

8. Sarah Slagstedt / September 23, 2010 I have dkms installed and I have done everything as above but get the old message Failed to open a session for the virtual machine win. The virtual machine win has terminated unexpectedly during startup with exit code 1. When starting from command line Virtualbox I get [root@embla yum.repos.d]# VirtualBox WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (2.6.33.3-85.fc13.i686) or it failed to load. Please recompile the kernel module and install it by sudo /etc/init.d/vboxdrv setup You will not be able to start VMs until this problem is fixed. WARNING: The compilation of the vboxdrv.ko kernel module failed during the

installation for some reason. Starting a VM will not be possible. Please consult the User Manual for build instructions. Qt WARNING: QGtkStyle was unable to detect the current GTK+ theme. Qt WARNING: Qt: Session management error: None of the authentication protocols specified are supported Any suggestions? Reply
o

JR / September 24, 2010 Hi Sarah, Do you have Gnome installed? This problem occurs because the system tries to detect the GTK+ theme, but it does not exist. You can try to fix this in the following way Start qtconfig-qt4 program:
qtconfig-qt4

And change another theme than GTK/GTK+ (QGtkStyle). Reply

Joe / October 2, 2010 Thanks this is very helpful, the only thing is that Im also getting the same error. No precompiled module for this kernel found trying to build one. Messages emitted during module compilation will be logged to /var/log/vboxinstall.log. Compilation of the kernel module FAILED! VirtualBox will not start until this problem is fixed. Please consult /var/log/vbox-install.log to find out why the kernel module does not compile. Most probably the kernel sources are not

found. Install them and execute /etc/init.d/vboxdrv setup as root. I have tried everything as explained there with out errors, Im running Fedora 13 x64, this same problem is happening to me running ClearOS 5.2 and 5.1 (which is based on CentOS 5.5, I think), the exact same message, would you please give some advice ?? Thanks a lot again. Reply

JR / October 4, 2010 Hi Joe, Are you getting the same qt4 errors or are you getting this No precompiled module for this kernel found error? Please post what you get when you run following command (as root):
/etc/init.d/vboxdrv setup

Reply 9. richard_site / October 12, 2010 What to do with this? # VirtualBox WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (2.6.31.5-127.fc12.i686.PAE) or it failed to load. Please recompile the kernel module and install it by sudo /etc/init.d/vboxdrv setup You will not be able to start VMs until this problem is fixed. Reply

JR / October 12, 2010 Hi richard, Try run following command (as root):
/etc/init.d/vboxdrv setup

Reply 10. antonio / October 17, 2010 Hi! When a VM I get this error in a window: Error In suplibOsInit (window title) Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing /etc/init.d/vboxdrv setup as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary. Then I run /etc/init.d/vboxdrv setup WARNING: All config files need .conf: /etc/modprobe.d/blacklist-vmc, it will be ignored in a future release. Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Removing old VirtualBox netadp kernel module [ OK ] Removing old VirtualBox netflt kernel module [ OK ] Removing old VirtualBox kernel module [ OK ] Trying to register the VirtualBox kernel modules using DKMS Error! Bad return status for module build on kernel: 2.6.32.21-168.fc12.i686 (i686) Consult the make.log in the build directory /var/lib/dkms/vboxhost/3.2.10/build/ for more information. [FALL] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FALL] (Look at /var/log/vbox-install.log to find out what went wrong)

I have them GTK+ Thanks!!!! Reply


o

antonio / October 17, 2010 ups!! I have Fedora 12 Reply

JR / October 17, 2010 Hi antonio, Could you post messages from /var/log/vbox-install.log file. After running following command (as root):
/etc/init.d/vboxdrv setup

Reply

antonio / October 17, 2010 Hi JR, Thank. Here vbox-install.log:


Uninstalling modules from DKMS removing old DKMS module vboxhost version 3.2.10

-----------------------------Deleting module version: 3.2.10 completely from the DKMS tree. -----------------------------Done. Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxhost/3.2.10/source -> /usr/src/vboxhost-3.2.10 DKMS: add Completed. Kernel preparation unnecessary for this kernel. Skipping... Building module: cleaning build area....

make KERNELRELEASE=2.6.32.21-168.fc12.i686 -C /lib/modules/2.6.32.21-168.fc12.i686/build M=/var/lib/dkms/vboxhost/3.2.10/build....(bad exit status: 2) 0 0 Failed to install using DKMS, attempting to install without make KBUILD_VERBOSE=1 -C /lib/modules/2.6.32.21168.fc12.i686/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules /usr/src/kernels/2.6.32.21-168.fc12.i686/scripts/gcc-version.sh: line 25: gcc: no se encontr la orden /usr/src/kernels/2.6.32.21-168.fc12.i686/scripts/gcc-version.sh: line 26: gcc: no se encontr la orden /usr/src/kernels/2.6.32.21-168.fc12.i686/arch/x86/Makefile:81: stack protector enabled but no compiler support make[1]: gcc: No se encontr el programa test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \ echo; \ echo " ERROR: Kernel configuration is invalid."; \ echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \ echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo; \ /bin/false) mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/* make -f scripts/Makefile.build obj=/tmp/vbox.0 gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d -nostdinc isystem -Iinclude -I/usr/src/kernels/2.6.32.21168.fc12.i686/arch/x86/include -include include/linux/autoconf.h D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wnotrigraphs -fno-strict-aliasing -fno-common -Werror-implicitfunction-declaration -Wno-format-security -fno-delete-nullpointer-checks -Os -msoft-float -mregparm=3 -freg-struct-return march=i686 -ffreestanding -pipe -Wno-sign-compare -fnoasynchronous-unwind-tables -fno-omit-frame-pointer -fnooptimize-sibling-calls -g -pg -I/lib/modules/2.6.32.21168.fc12.i686/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxdrv/ I/tmp/vbox.0/vboxdrv/include -I/tmp/vbox.0/vboxdrv/r0drv/linux D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX DVBOX_WITH_HARDENING DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_X86 DVBOX_WITH_64_BITS_GUESTS -DMODULE -

D"KBUILD_STR(s)=#s" D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)" D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" D"DEBUG_HASH=27" -D"DEBUG_HASH2=27" -c -o /tmp/vbox.0/linux/SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrvlinux.c /bin/sh: gcc: no se encontr la orden make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 127 make[1]: *** [_module_/tmp/vbox.0] Error 2 make: *** [vboxdrv] Error 2 Reply

JR / October 18, 2010 I do not understand Spanish well, but it seems that gcc does not exist. So try following (as root):
yum install gcc

Then run following again:


/etc/init.d/vboxdrv setup

Does it work then? Or do you receive more errors? Reply

antonio / October 18, 2010 JR, Sorry, I did not realize it was in Spanish. Installing gcc, Virtualbox works correctly!!!! Thanks!!!! Reply

JR / October 18, 2010 No problem, with Spanish :) I would have asked more specifically if I had not got it translated myself :)

Nice to hear that you got it working correctly! Youre welcome! Reply 11. Woodsman / October 26, 2010 Errors I am getting trying to get Virtual Box running on Oracle Linux(Red Hat Enterprise Linux Server release 5.5 (Tikanga)) [root@tag5263 ~]# /etc/init.d/vboxdrv setup Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel source for kernel 2.6.18-194.el5 cannot be found at /lib/modules/2.6.18-194.el5/build or /lib/modules/2.6.18-194.el5/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) [root@tag5263 ~]# Any help would be appreciated I tried everything I read in the article and comments. Reply
o

JR / October 26, 2010 Hi Woodsman, Could you post messages from /var/log/vbox-install.log file. After running following command (as root):
/etc/init.d/vboxdrv setup

Reply 12. K2 / October 28, 2010 I got a problem when I try to start using VirtualBox. This is Fedora 13 & here I post the error message from the terminal screen: [root@localdomain yum.repos.d]# VirtualBox WARNING: The vboxdrv kernel module is not loaded. Either there is no module

available for the current kernel (2.6.34.7-61.fc13.i686.PAE) or it failed to load. Please recompile the kernel module and install it by sudo /etc/init.d/vboxdrv setup You will not be able to start VMs until this problem is fixed. So I follow the instruction then there is the result: [root@localdomain yum.repos.d]# sudo /etc/init.d/vboxdrv setup WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel source for kernel 2.6.34.7-61.fc13.i686.PAE cannot be found at /lib/modules/2.6.34.7-61.fc13.i686.PAE/build or /lib/modules/2.6.34.761.fc13.i686.PAE/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) And there is the message in /var/log/vbox-install.log: Uninstalling modules from DKMS removing old DKMS module vboxhost version 3.2.10 Deleting module version: 3.2.10 completely from the DKMS tree. Done. Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxhost/3.2.10/source -> /usr/src/vboxhost-3.2.10 DKMS: add Completed. You can use the kernelsourcedir option to tell DKMS where its located. Failed to install using DKMS, attempting to install without Makefile:159: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop. I am a beginner of Linux so please help to describe the problem, any help will be appreicated! ^_^

Reply
o

JR / October 30, 2010 Hi K2, Could you post messages from /var/log/vbox-install.log file. After running following command (as root):
/etc/init.d/vboxdrv setup

Also you could try following:


yum install gcc kernel-devel kernel-headers

Then do following:
KERN_DIR=/usr/src/kernels/`uname -r` export KERN_DIR

Then try run following again:


/etc/init.d/vboxdrv setup

Reply

K2 / October 31, 2010 Thanks for your help, JR! :D I followed your instruction & copy the result below: [root@localdomain yum.repos.d]# /etc/init.d/vboxdrv setup WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel source for kernel 2.6.34.7-61.fc13.i686.PAE cannot be found at /lib/modules/2.6.34.7-61.fc13.i686.PAE/build or /lib/modules/2.6.34.761.fc13.i686.PAE/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) [root@localdomain yum.repos.d]# yum install gcc kernel-devel kernelheaders

Loaded plugins: presto, refresh-packagekit rpmfusion-free-updates | 3.3 kB 00:00 updates/metalink | 5.0 kB 00:00 updates | 4.7 kB 00:00 updates/primary_db | 4.1 MB 00:07 virtualbox | 951 B 00:00 Setting up Install Process Package gcc-4.4.4-10.fc13.i686 already installed and latest version Package kernel-devel-2.6.34.7-61.fc13.i686 already installed and latest version Package kernel-headers-2.6.34.7-61.fc13.i686 already installed and latest version Nothing to do [root@localdomain yum.repos.d]# KERN_DIR=/usr/src/kernels/uname r [root@localdomain yum.repos.d]# export KERN_DIR [root@localdomain yum.repos.d]# /etc/init.d/vboxdrv setup WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel source for kernel 2.6.34.7-61.fc13.i686.PAE cannot be found at /lib/modules/2.6.34.7-61.fc13.i686.PAE/build or /lib/modules/2.6.34.761.fc13.i686.PAE/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) And this is the messages from /var/log/vbox-install.log file: Uninstalling modules from DKMS removing old DKMS module vboxhost version 3.2.10 Deleting module version: 3.2.10 completely from the DKMS tree. Done. Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxhost/3.2.10/source -> /usr/src/vboxhost-3.2.10

DKMS: add Completed. You can use the kernelsourcedir option to tell DKMS where its located. Failed to install using DKMS, attempting to install without /bin/sh: line 0: test: /usr/src/kernels/uname: binary operator expected Makefile:177: *** Error: KERN_DIR does not point to a directory. Stop. Please let me know if any idea to fix this, thanks! ^_^ Reply 13. K2 / October 31, 2010 Thanks for your help, JR! :D I followed your instruction & copy the result below: [root@localdomain yum.repos.d]# /etc/init.d/vboxdrv setup WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel source for kernel 2.6.34.7-61.fc13.i686.PAE cannot be found at /lib/modules/2.6.34.7-61.fc13.i686.PAE/build or /lib/modules/2.6.34.761.fc13.i686.PAE/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) [root@localdomain yum.repos.d]# yum install gcc kernel-devel kernel-headers Loaded plugins: presto, refresh-packagekit rpmfusion-free-updates | 3.3 kB 00:00 updates/metalink | 5.0 kB 00:00 updates | 4.7 kB 00:00 updates/primary_db | 4.1 MB 00:07 virtualbox | 951 B 00:00 Setting up Install Process Package gcc-4.4.4-10.fc13.i686 already installed and latest version Package kernel-devel-2.6.34.7-61.fc13.i686 already installed and latest version Package kernel-headers-2.6.34.7-61.fc13.i686 already installed and latest version Nothing to do [root@localdomain yum.repos.d]# KERN_DIR=/usr/src/kernels/uname -r [root@localdomain yum.repos.d]# export KERN_DIR [root@localdomain yum.repos.d]# /etc/init.d/vboxdrv setup WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. Stopping VirtualBox kernel modules [ OK ]

Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel source for kernel 2.6.34.7-61.fc13.i686.PAE cannot be found at /lib/modules/2.6.34.7-61.fc13.i686.PAE/build or /lib/modules/2.6.34.761.fc13.i686.PAE/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) And this is the messages from /var/log/vbox-install.log file: Uninstalling modules from DKMS removing old DKMS module vboxhost version 3.2.10 Deleting module version: 3.2.10 completely from the DKMS tree. Done. Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxhost/3.2.10/source -> /usr/src/vboxhost-3.2.10 DKMS: add Completed. You can use the kernelsourcedir option to tell DKMS where its located. Failed to install using DKMS, attempting to install without /bin/sh: line 0: test: /usr/src/kernels/uname: binary operator expected Makefile:177: *** Error: KERN_DIR does not point to a directory. Stop. Please let me know if any idea to fix this, thanks! ^_^ Reply 14. MissyB / November 7, 2010 Sometimes it is soooo hard to love Fedora, but all of my problems have been solved with info on your site thank you so much! Beats posting on forums and getting patronising responses from people who havent bothered to read actual problem! Thank you again! Reply
o

JR / November 7, 2010 Hi MissyB, nice to see you here! :)

Glad to hear that my site has been helpful to you! And feel free to ask if you have any problems. I will try my best to answer :) Reply 15. Bijon / November 14, 2010 Hi, Thank you so much for your great post. I have just completed set-up virtualbox on my Centos VPS by simply copying and pasting the commands. Keep up great job. Ill be back if I need further help. Thanks Reply 16. Brian / December 3, 2010 Can someone type what needs to be reconfigured in the Kernel? This is the spot i am stuck on. Reply 17. BrianBrian / December 3, 2010 the RC1908 not installed is the issue Reply 18. brian / December 3, 2010 where is this to be pasted?! ## Current running kernel on Fedora ## KERN_DIR=/usr/src/kernels/`uname -r` ## Current running kernel on CentOS and Red Hat (RHEL) ## KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` ## Fedora example ## KERN_DIR=/usr/src/kernels/2.6.33.5-124.fc13.i686 ## CentOS and Red Hat (RHEL) example ## KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64

## Export KERN_DIR ## export KERN_DIR Reply 19. Brian / December 4, 2010 I am new to Fedora ..I have successfully installed all steps accept this one Add KERN_DIR environment variable ## Current running kernel on Fedora ## KERN_DIR=/usr/src/kernels/`uname -r` ## Current running kernel on CentOS and Red Hat (RHEL) ## KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` ## Fedora example ## KERN_DIR=/usr/src/kernels/2.6.33.5-124.fc13.i686 ## CentOS and Red Hat (RHEL) example ## KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64 ## Export KERN_DIR ## export KERN_DIR can someone tell me what this means? Reply
o

JR / December 4, 2010 Hi Brian, On Fedora paste following lines to console as root:


KERN_DIR=/usr/src/kernels/`uname -r` export KERN_DIR

Then install VirtualBox using YUM (as root):


yum install VirtualBox-3.2

Or if you have already installed VirtualBox then setup vbox kernel drivers with following command (as root):
/etc/init.d/vboxdrv setup

Reply

Brian / December 4, 2010 I tried the following steps only to receive a failed error.then i opened by sudo gedit /etc/init.d/vboxdrv setup now that I have vboxdrv setp opened w gedit text editor any advice on wht needs to be compiled? Reply

JR / December 5, 2010 Do not edit vboxdrv init script, because it should work quite right. Please post full error messages what you get? Reply

20. Brian / December 4, 2010 /lib/modules//lib/modules/2.6.35.6-48.fc14.i686.PAE/build in this linkit says the link is broken in the /build Reply 21. rosco / December 4, 2010 RC1908 KERNEL not installed How can this be taken care of? Reply
o

JR / December 5, 2010 Hi rosco, First install following packages:


yum install gcc kernel-devel kernel-headers

Set KERN_DIR environment variable:


## Current running kernel on Fedora ## KERN_DIR=/usr/src/kernels/`uname -r` ## Current running kernel on CentOS and Red Hat (RHEL) ## KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` ## Export KERN_DIR ## export KERN_DIR

Then install VirtualBox or run kernel driver setup:


yum install VirtualBox-3.2 ## OR ## /etc/init.d/vboxdrv setup

Reply 22. Romz / December 8, 2010 How can i solved this problem Im using Fedora 14 GLib-GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed: (connection>initialization_error == NULL) Aborted (core dumped) Reply
o

JR / December 9, 2010 Hi Romz, Are you sure that you installed the correction version of VirtualBox? Could you post full output from console after running VirtualBox command? And following command output:
yum list installed |grep -i virtualbox

Reply 23. earl / December 13, 2010 besides being rootwhat else do you key in before this?

## Current running kernel on Fedora ## KERN_DIR=/usr/src/kernels/`uname -r` ## Current running kernel on CentOS and Red Hat (RHEL) ## KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` ## Export KERN_DIR ## export KERN_DIR every since i started using Fedora 14.I cannot use the virtual machines! none of them! Reply 24. earl / December 13, 2010 YOUVE GOT TO BE MORE SPECIFIC ! WILL YOU PLEASE SET AN EXAMPLE FOR THOSE WHOM NEVER USED FEDORA? WHAT DOES KERN_DIR mean? do I change uname with something else? is there any tutorials on seting KERN_DIR? KERN_DIR=/usr/src/kernels/`uname -r` ## Current running kernel on CentOS and Red Hat (RHEL) ## KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` ## Export KERN_DIR ## export KERN_DIR Reply
o

JR / December 13, 2010 Hi earl, You should simply run following commands on Fedora as root:
## Set KERN_DIR environment variable with following command ## KERN_DIR=/usr/src/kernels/`uname -r` ## You could verify what happens after this command with following command ## echo $KERN_DIR ## Output Shouls look something like following ## /usr/src/kernels/2.6.35.9-64.fc14.i686

## Then export KERN_DIR environment variable ## export KERN_DIR

You could also use following method:


## Print the kernel release ## uname -r ## Output something like ## 2.6.35.9-64.fc14.i686 ## Set KERN_DIR environment variable using your kernel release ## KERN_DIR=/usr/src/kernels/2.6.35.9-64.fc14.i686 ## You could verify KERN_DIR variable with following command ## echo $KERN_DIR ## Export your KERN_DIR environment variable ## export KERN_DIR

Is this specific enough? Did you get the point? Reply 25. Clyde / December 13, 2010 this is what i keyed in KERN_DIR=/usr/src/kernels/2.6.35.9-64.fc14.i686 yes.this is my kernel followed by export where is my error?! Reply
o

JR / December 13, 2010 Hi Clyde, If your kernel release is 2.6.35.9-64.fc14.i686 then just run following:
KERN_DIR=/usr/src/kernels/2.6.35.9-64.fc14.i686 export KERN_DIR

Check more information from here. Reply 26. Apuesto / December 22, 2010 I have tried almost every solution given here, and I still have this problem [root@unkown Apuesto]# sudo /etc/init.d/vboxdrv setup Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel source for kernel 2.6.34.7-63.fc13.i686.PAE cannot be found at /lib/modules/2.6.34.7-63.fc13.i686.PAE/build or /lib/modules/2.6.34.763.fc13.i686.PAE/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) [root@unkown Apuesto]# Then the log from /var/log/vbox-install.log Uninstalling modules from DKMS removing old DKMS module vboxhost version 3.2.12 Deleting module version: 3.2.12 completely from the DKMS tree. Done. Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxhost/3.2.12/source -> /usr/src/vboxhost-3.2.12 DKMS: add Completed. You can use the kernelsourcedir option to tell DKMS where its located. Failed to install using DKMS, attempting to install without Makefile:159: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop. Any one with suggestions? Am trying to install windows 7 on the virtual box. Reply

JR / December 22, 2010 Hi Apuesto, Did you specify KERN_DIR environment variable? If yes then please post output of following commands:
yum list installed gcc kernel-devel kernel-headers ## AND ## uname -a

Reply 27. Apuesto / December 23, 2010 The output [root@unkown Apuesto]# yum list installed gcc kernel-devel kernel-headers Loaded plugins: presto, refresh-packagekit Installed Packages gcc.i686 4.4.5-2.fc13 @updates kernel-devel.i686 2.6.34.7-63.fc13 @updates kernel-headers.i686 2.6.34.7-63.fc13 @updates [root@unkown Apuesto]# uname -a Linux unkown 2.6.34.7-63.fc13.i686.PAE #1 SMP Fri Dec 3 12:28:58 UTC 2010 i686 i686 i386 GNU/Linux Reply
o

JR / December 23, 2010 Looks good. Did you specify KERN_DIR environment variable, like:
KERN_DIR=/usr/src/kernels/`uname -r` export KERN_DIR

Then you could install/reinstall VirtualBox or run vboxdrv setup:


yum install VirtualBox-3.2 ## OR ## yum reinstall VirtualBox-3.2 ## OR ##

/etc/init.d/vboxdrv setup

Reply 28. MikeOMaine / December 24, 2010 JR, You just gave me the best Christmas gift ever! I had struggled with this for a couple of days, got it working on RH4, but had a heck of time with RH6, I read your article, tried it again, still failed then I re-read your article again, slooooowly, and followed your instructions to the letter, and. finally I have it working. Thanks so much for your detailed instructions, they work. I am a somewhat newbie to Linux, been around Solaris for a while, but lots to learn. I am on my way to Windoze independence. Thanks again, and have a great Christmas! Reply 29. Brian Mulford / January 26, 2011 I finally got it! The parts I was not installing make & automake! Reply 30. caver / January 27, 2011 Those of you like me and Apuesto who have a PAE kernel. you need to install the PAE kernel sources yum install kernel-PAE-devel.i686 Chris Reply
o

JR / January 28, 2011 Good point caver! :) Added to guidethanks! Reply

James / October 19, 2011 I tried everything listed and sure enough this was my answer! Thank you everyone! Reply

31. Spencer / February 28, 2011 This has got to be the easiest virtualbox installs Ive ever seen. The first time I did this set, I followed some other idiots instructions and it was a nightmare! thanks for posting something truly useful! Reply 32. Thomas Tessier / April 2, 2011 Do you have to uninstall VBox 3.x prior to installing Vbox 4.x? Do you need to shutdown the network translation services prior to to an update. I am getting collisions with files that 3.x says it needs when installing 4.x so just trying to make sure I have the correct install flow. Thanks, TomT Reply
o

JR / April 2, 2011 Hi Thomas, I think uninstalling VirtualBox 3.x and reinstall VirtualBox 4.x should be enough to get Virtualbox 4.x up and running. At least for myself, it worked out correctly, but if you have something valuable data related to VirtualBox 3.x installation, then you should take backup of them. For me this method uninstall VBox 3.x and reinstall VBox 4.x had no effect on any virtual machines (I have several virtual machines), but course its better to do it as safe as possible. Reply

Thomas Tessier / April 2, 2011

JR, Thanks just wish they would add that to the FAQ that uninstalling previous version may be necessary; the VB folks make is sound like this Upgrade should just overright the previous one with issues. For those of us that just run the Stock vbox configuration if there is such a thing I would expect it to work that way. Not that I was shy from doing what I suggested; just wanted to make sure I didnt miss something obvious. TomT Reply

JR / April 4, 2011 I agree with you that this should definitely be added to FAQ. Reply

33. Milton / May 30, 2011 Hi JR, your site always help me a lot. I fallow every step when intall vbox in fedora 13/14 but now in have a problem I dont know if is just me or the virtualbox.repo doesnt work. Because when in did the yum update it return me an error that can not find the url of the repo info. thus I erased the repo and download the rpm directly from virtualbox.org and installed it, after that I do the following steps and works perfectly, only that I dont have virtualbox.repo jejeje sorry for my bad english un saludo! Reply 34. prash / June 30, 2011 hi when i try to run the vbox i alyays get a message that:this kernel requires an x86-64, but only detected an i686 cpu unable to boot please use a kernel appropriate for your cpu. please help me out. prash

Reply
o

JR / July 2, 2011 Hi prash, Which processor do you use 32-bit or 64-bit? Reply

35. sanam / July 5, 2011 got the following error Makefile:178: *** Error: KERN_DIR does not point to a directory. Stop Reply
o

JR / July 5, 2011 Hi sanam, Could you print your KERN_DIR variable and post here?
echo $KERN_DIR

Reply 36. pottzie / July 9, 2011 Your guide instructions worked and I was able to get VirtualBox running without a problem. Now Im trying to get my XP guest to print. When I try to get usb2 working, I get a box saying that I need to install Oracle Vm Extension Pack. From what Ive found, that should have been installed from your guide. Once I get VB working, I guess I need another guide to connect to the printer. Reply
o

JR / July 11, 2011 Hi pottzie, Install it with following method: 1. Download Oracle VM Extension Pack. It found also here. 2. Open VirtualBox

3. Select File > Preferences > Extensions 4. Click Add Package icon 5. Select package from your disk 6. Install it with installer Then try again, did you get it working? And note its free only for personal use Reply 37. Roche / July 21, 2011 Hi Jr i your website very helpful. However iam stuck in situation like them I did the following 1.Downloaded here in this http://www.virtualbox.org/wiki/Linux_DownloadsDownload it and Save it in Downloads. 2. Went the terminal did the: sudo rpm -Uvh cd/location/virtualbox-idownloaded . Press Enter if it perfectly goes along just fine then.. 3.First Error: Failed dependencies: libSDL-1.2.so.0 is needed by VirtualBox-4.14.1.0_73009_fedora14-1.i686 So i went to the Terminal and type: sudo yum install libSDL-* 4. Second Error:No precompiled module for this kernel found trying to build one. Messages emitted during module compilation will be logged to /var/log/vbox-install.log. Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) and so i put to the terminal: yum install gcc kernel-devel kernel-headers By this time i went to my menu and found my Oracle VM. However i encountered an error after installing and now running the xp that i installed. it says: Pop up: Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing /etc/init.d/vboxdrv setup as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

so i installed : Go to terminal and type: sudo yum install dkms then i typed: sudo /etc/init.d/vboxdrv setup still the same error is coming after i typed this : sudo /etc/init.d/vboxdrv setup Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel source for kernel 2.6.35.6-45.fc14.i686 cannot be found at /lib/modules/2.6.35.6-45.fc14.i686/build or /lib/modules/2.6.35.6-45.fc14.i686/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) In the log File : You can use the kernelsourcedir option to tell DKMS where its located. Failed to install using DKMS, attempting to install without Makefile:172: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop. then i did this sudo yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernelheaders kernel-devel then the output was still this : Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS[FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) i also did the instruction you wrote there which is: ## Set KERN_DIR environment variable with following command ## KERN_DIR=/usr/src/kernels/`uname -r` ## You could verify what happens after this command with following command ## echo $KERN_DIR ## Output Shouls look something like following ## /usr/src/kernels/2.6.35.9-64.fc14.i686 ## Then export KERN_DIR environment variable ## export KERN_DIR this is kinda drivin me nuts: help!

oh btw i checked the kernels/2.6.35.9-64.fc14.i686 ls it and saw the build and source in red. tried to open it and it was empty. Reply
o

JR / July 21, 2011 Hi Roche, Could you post output of following command:
uname -a

Reply

Roche / July 22, 2011 Hi jr here : uname -a Linux localhost.localdomain 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct 18 23:56:17 UTC 2010 i686 i686 i386 GNU/Linux rpm -qa|grep kernel*kernel-2.6.35.6-45.fc14.i686 kernel-devel-2.6.35.13-92.fc14.i686 abrt-addon-kerneloops-1.1.13-2.fc14.i686 kernel-headers-2.6.35.13-92.fc14.i686 Reply

JR / July 22, 2011 Hi again Roche, The problem seems to be in the fact that you have a different version of the kernel, than kernel-devel and kernel-headers packages are. So you have to upgrade your kernel and rebootso simply do following:
yum update kernel kernel-devel kernel-headers reboot

Check that the all versions match and then try to set KERN_DIR again and run:

/etc/init.d/vboxdrv setup

Btw. I recommend to use VirtualBox yum repos and I updated this guide also to VB 4.1 version :) Reply

Roche / July 22, 2011 Thank you very much JR. :) Reply

38. revo / July 24, 2011 Wow ! this is awesome.! worked perfectly on my centos 5.6 Reply 39. openx / July 30, 2011 I successfully installed and run VirtualBox on fedora 14, but i notice an error while shutting down my machine, the error said panic occurred switching back text to console. Google cant answer my query so I decided to put it here. Thanks in Advance ^_^ Reply 40. openx / July 31, 2011 thanks for this stuff JR, it works. but when im going to shut down my fedora machine, i got an error near shutdown, last line is panic occurred switching back text to console. Reply
o

JR / August 1, 2011 Hi openx, Do you get that error on virtual machine or your host machine? Reply

41. KARTHICK / August 12, 2011 Hi. I am trying to install virtualbox-4.1 on ubuntu 11.04. I actually updated my previous version of ubuntu to this.

When i try to open my virtualbox-4.1. I am get the following error. Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing /etc/init.d/vboxdrv setup as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary. when i give /etc/init.d/vboxdrv setup as a root it shows error like this. root@karthick-pc:/home/karthick_sj88# /etc/init.d/vboxdrv setup * Stopping VirtualBox kernel modules * done. * Uninstalling old VirtualBox DKMS kernel modules * done. * Trying to register the VirtualBox kernel modules using DKMS Error! Bad return status for module build on kernel: 2.6.38-10-generic (i686) Consult the make.log in the build directory /var/lib/dkms/vboxhost/4.0.0/build/ for more information. * Failed, trying without DKMS * Recompiling VirtualBox kernel modules * Look at /var/log/vbox-install.log to find out what went wrong I also installed dkms and it is up to date. But still i am facing that error. Here is the vbox-install.log Uninstalling modules from DKMS removing old DKMS module vboxhost version 4.0.0 Deleting module version: 4.0.0 completely from the DKMS tree. Done. Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxhost/4.0.0/source -> /usr/src/vboxhost-4.0.0 DKMS: add Completed. Kernel preparation unnecessary for this kernel. Skipping

Building module: cleaning build area. make KERNELRELEASE=2.6.38-10-generic -C /lib/modules/2.6.38-10-generic/build M=/var/lib/dkms/vboxhost/4.0.0/build.(bad exit status: 2) 0 0 Failed to install using DKMS, attempting to install without Makefile:185: *** Error: KERN_DIR does not point to a directory. Stop. Thanks in advance Reply 42. Steve S / August 12, 2011 Thanks for the info. With Virtual Box 4.1, setting KERN_DIR isnt sufficient. Your KERN_DIR actually has to be: ## Current running kernel on CentOS and Red Hat (RHEL) ## KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m` This isnt what the devel packages install (at least, this isnt what I have, and I dont think I renamed them). The devel pacakge had /usr/src/kernels/2.6.18-194.26.1.el5-x86_64. Once I created KERN_DIR with the uname chant, above, and added a symlink /usr/src/kernels/2.6.18-194.el5-x86_64, the Guest Additions installer was happy. Prior to that, it kept telling me that KERN_DIR was not a directory. Im 99% sure I exported KERN_DIR in both scenarios; so it is possible that 4.1.0 VBox doesnt honor KERN_DIR on CentOS anymore, it generates it internally (and never tells you what it is looking for). Your post saved me the trouble of digging through their shell script. Thanks! Reply 43. dialorb / August 19, 2011 tnk man Reply 44. dedi009 / August 23, 2011 thxs a lot

Reply
o

Rajesh / September 18, 2011 Hello, I am having problem installing VB4.1.x on OEL 5.6. I followed the instructions on this blog to update the packages. ie [root@oraracbox kernels]# yum update kernel kernel-devel kernel-headers Loaded plugins: rhnplugin, security This system is not registered with ULN. ULN support will be disabled. Skipping security plugin, no data Setting up Update Process No Packages marked for Update [root@oraracbox kernels]# ________________________________________ then I tried to do the installation and this error comes up __________________________________________________________________ _ Makefile:172: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DI R= and run Make again. Stop. __________________________________________________________________ __ so I set my KERN_DIR variable to [root@oraracbox kernels]# export KERN_DIR=/usr/src/kernels/`uname -r``uname -m` [root@oraracbox kernels]# echo $KERN_DIR /usr/src/kernels/2.6.32-100.26.2.el5-x86_64 [root@oraracbox kernels]# when I cd to [root@oraracbox kernels]# ls -l total 16

drwxr-xr-x 19 root root 4096 Sep 18 21:25 2.6.18-238.el5-x86_64 drwxr-xr-x 19 root root 4096 Sep 18 21:45 2.6.18-238.el5-xen-x86_64 lrwxrwxrwx 1 root root 25 Sep 18 21:45 2.6.18-238.el5xen-x86_64 -> 2.6.18238.el5-xen-x86_64 there is directory with 100 in it for my current version of uname -r that is [root@oraracbox tmp]# uname -r 2.6.32-100.26.2.el5 Any advice will be much appreciated as I am stuck here. Reply

JR / September 19, 2011 Hi Rajesh, Could you post following info:


yum info kernel kernel-devel kernel-headers

Reply 45. revo / October 6, 2011 Hi JR A couple of months back i followed ur how-to and installed VB 4.1. Now i want to upgrade to 4.1.4. simple yum update Virtualbox is enough for this???? And one more issue i am facing is if i keep open VB machine for some time on my centos 5.6 it is having some memory leak. To get the centos login window i have to kill VB processes running. If not i cant see any login screen to type my centos password. Can u please help me on this. Reply
o

JR / October 7, 2011 Hi revo, Updating should be easyyou can use following command if you have VB-4.1 installed:
yum update VirtualBox-4.1

And if you have VB-4.0 installed then run:

yum install VirtualBox-4.1

You might to need to run also following command with working KERN_DIR:
/etc/init.d/vboxdrv setup

Memory leak issues is bit more problematic, but you can try this VirtualBox 4.1.4 version and check what happens with it? Reply

revo / October 13, 2011 Hi JR i updated my virtual box using yum update VirtualBox-4.1. And ran setup also. And this time no memory leaks . It is saying that usb accessibility is not possible. And asking to add user to vboxusers for enabling. How to do this??? Thanks. Reply

JR / October 13, 2011 Hi revo, Excellent to hear that memory leaks problems are solved. :) You can add your user to vboxusers with following command:
usermod -a -G vboxusers user_name ## Real example ## usermod -a -G vboxusers revo

Reply 46. hoek / October 9, 2011 Hello JR, Cant get the box working. Help needed please I have gnome (centos 5.4) running on a clearos system. cant install vmbox 3.1 on centos 5.4 [root@system yum.repos.d]# /etc/init.d/vboxdrv setup Stopping VirtualBox kernel module [ OK ] Recompiling VirtualBox kernel module [MISLUKT]

(Look at /var/log/vbox-install.log to find out what went wrong) Makefile:152: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again Installed Packages kernel-PAE.i686 2.6.18-194.8.1.v5 installed kernel-devel.i686 2.6.18-194.8.1.v5 installed kernel-devel.i686 2.6.18-274.3.1.el5 installed kernel-headers.i386 2.6.18-274.3.1.el5 installed php.i386 5.1.6-27.v5.3.1 installed php-cli.i386 5.1.6-27.v5.3.1 installed php-common.i386 5.1.6-27.v5.3.1 installed php-imap.i386 5.1.6-27.v5.3.1 installed php-kolab.noarch 2.2.0-3.2.v5 installed php-ldap.i386 5.1.6-27.v5.3.1 installed php-mbstring.i386 5.1.6-27.v5.3.1 installed php-mysql.i386 5.1.6-27.v5.3.1 installed php-pdo.i386 5.1.6-27.v5.3.1 installed phpMyAdmin.noarch 3.2.3-1.1.v5 installed phpsysinfo.noarch 2.5.4-4.2.v5 installed Can you help me? Reply
o

JR / October 11, 2011 Hi hoek, Did you set KERN_DIR variable and exported it? Reply

47. Greg / October 27, 2011 For Centos 6 depo file (virtualbox.repo from wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo ) Edit it and use this base URL: baseurl=http://download.virtualbox.org/virtualbox/rpm/rhel/$releasever/$basearch Reply
o

JR / October 27, 2011 Hi Greg,

Thanks for note. I actually fixed this part of guide to working directly also with CentOS 6 and Red Hat (RHEL) 6. Now if you use:
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.rep o

It should work normally with CentOS 6/5.6 and Red Hat (RHEL) 6/5.6. :) Reply 48. Mark / November 3, 2011 If anyone is interested these are the steps I followed to install VirtualBox 4.1 on a clean installation of Oracle 64bit Enterprise Linux 5.7 Install Enterprise Linux Register on Linux Network rpm import /usr/share/rhn/RPM-GPG-KEY up2date-nox register Register to following channels on Linux Network Enterprise Linux 5 Add ons (x86_64) Enterprise Linux 5 Latest (x86_64) Oracle Software for Enterprise Linux 5 (x86_64) Oracle Linux 5 Latest (x86_64) To install DKMS Extra Packages for Enterprise Linux (EPEL) v5 rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-54.noarch.rpm yum update yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel yum install dkms cd /etc/yum.repos.d/ wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo yum install VirtualBox-4.1 shutdown -r now

Re-Setup the kernel module by /etc/init.d/vboxdrv setup as root FINISHED Reply


o

JR / November 4, 2011 Hi Mark, Thank you very much! This is excellent guide, I think I have to improve mine with some things :) Reply

49. sequi / November 13, 2011 Well, the guide is excellent, but there is something wrong with the yum guys: ALL THESE commands, steps and decisions should do it automatically by typing yum install -y virtualbox! If not, what is the sense of yum?? Reply 50. Fodder / November 16, 2011 Just to say thanks! worked great Fedora 16 Virtualbox 4.1.6. Reboot is a must people!! mine only sorted the kernel after that! Cheers again! Reply 51. Joe / November 17, 2011 Thanks for the guide! FYI, I know you dont talk about installing the extension packs here but I thought it would be relevant to post my issue/solution. I had an issue installing the extension pack on F16x86. Turns out that there is an issue with bash (see: http://fedoraforum.org/forum/showthread.php?t=272450). So when installing the extension pack, VirtualBox gives some cryptic error about no shell something or other. The solution is to run: yum reinstall bash

Then try reinstalling the extension pack. Reply 52. acc / November 18, 2011 Uninstalling modules from DKMS removing old DKMS module vboxhost version 4.1.6 Deleting module version: 4.1.6 completely from the DKMS tree. Done. Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxhost/4.1.6/source -> /usr/src/vboxhost-4.1.6 DKMS: add Completed. Failed to install using DKMS, attempting to install without Makefile:181: *** Error: KERN_DIR does not point to a directory. Stop. Reply
o

JR / November 19, 2011 Hi acc, Did you check this guide troubleshooting section? Reply

53. sscholsey / November 20, 2011 Worked great thanks Reply 54. acc / November 22, 2011 ive follow all tutorial mr.JR btw here uname -r 3.1.0-7.fc16.x86_64

[root@Dagga bob]# KERN_DIR=/usr/src/kernels/3.1.0-7.fc16.x86_64 [root@Dagga bob]# service vboxdrv setup Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMSError! echo Your kernel headers for kernel 3.1.0-7.fc16.x86_64 cannot be found at /lib/modules/3.1.0-7.fc16.x86_64/build or /lib/modules/3.1.0-7.fc16.x86_64/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) [root@Dagga bob]# uname -r 3.1.0-7.fc16.x86_64 [root@acc]# export KERN_DIRN [root@acc]#KERN_DIR=/usr/src/kernels/3.1.0-7.fc16.x86_64 [root@acc]# service vboxdrv setup Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMSError! echo Your kernel headers for kernel 3.1.0-7.fc16.x86_64 cannot be found at /lib/modules/3.1.0-7.fc16.x86_64/build or /lib/modules/3.1.0-7.fc16.x86_64/source. [FAILED] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [FAILED] (Look at /var/log/vbox-install.log to find out what went wrong) Reply
o

JR / November 22, 2011 Hi acc, First make sure that you have latest packages and needed dependencies on your system:
yum update yum install binutils gcc make patch libgomp glibc-headers glibcdevel kernel-headers kernel-devel dkms reboot

Then install and setup VirtualBox:


yum install VirtualBox-4.1 service vboxdrv setup

Do you get still some errors?

Reply 55. acc / November 22, 2011 Great . Ty for helping me Mr.JR Reply
o

JR / November 22, 2011 You are welcome, nice to hear that you get it working! :)

Вам также может понравиться