VirtualBox 6.1.28 / 6.1.29 on Fedora 35/34/33, CentOS/RHEL 8/7 - Comment Page: 9
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 professional-quality virtualization solution that is also Open Source Software.
Check video guide howto install VirtualBox 6.1.28/6.1.29 on Fedora 35/34/33 using .run installer:
Check video guide howto install VirtualBox 6.1.28 on Fedora 34/33 using Oracle's own dnf repo:
Watch More Videos and Subscribe to if-not-true-then-false.com Youtube Channel
VirtualBox supports a large number of guest operating...
Hi, when updated to the new version 4.1.16 i get this error
Failed to install the Extension Pack Oracle_VM_VirtualBox_Extension_Pack-4.1.6-78094.vbox-extpack. The installer failed with exit code 127: The value for the SHELL variable was not found the /etc/shells file This incident has been reported.. Result Code: NS_ERROR_FAILURE (0x80004005) Component: ExtPackManager Interface: IExtPackManager
and then i have install it from command line like this:
# VBoxManage extpack install –replace Oracle_VM_VirtualBox_Extension_Pack-4.1.6-74713.vbox-extpack
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Successfully installed “Oracle VM VirtualBox Extension Pack”
source of this solution: http://marcofalchi.blogspot.com/2011/11/failed-to-install-extension-pack-oracle.html
I have followed the steps 1 by 1 and when i do /etc/init.d/vboxdrv setup or service vboxdrv setup it hangs at ‘Uninstalling old VirtualBox DKMS kernel modules’ and never comes back. I am running Centos6.2 here is more information:
[[email protected] cwoods]# rpm -qa kernel* |sort
kernel-2.6.32-220.13.1.el6.x86_64
kernel-2.6.32-220.17.1.el6.x86_64
kernel-2.6.32-220.7.1.el6.x86_64
kernel-2.6.32-220.el6.x86_64
kernel-devel-2.6.32-220.13.1.el6.x86_64
kernel-devel-2.6.32-220.17.1.el6.x86_64
kernel-firmware-2.6.32-220.17.1.el6.noarch
kernel-headers-2.6.32-220.17.1.el6.x86_64
[[email protected] cwoods]# uname -a
Linux woods.nsi.loc 2.6.32-220.17.1.el6.x86_64 #1 SMP Wed May 16 00:01:37 BST 2012 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] cwoods]#
Thanks for helping.
Turns out I am impatient :-)
Hi Chris,
Nice to hear that you got it working… :D
Thanks for posting great instructions.
On Fedora 17 there is a less known bug that is causing an error in the vboxdrv setup.
Basically when dkms is installed, the /usr/sbin/dkms file gets installed as /usr/sbin/dkms.old. So the /etc/init.d/vboxdrv setup gives a ‘Trying to register kernel using dkms – Failed’ message.
Solution:
After step 4) above, run this command by logging in as root in terminal windows.
mv /usr/sbin/dkms.old /usr/sbin/dkms
Then continue with step 5 onwards.
BTW – This bug is being fixed right now and there are some patches available on internet.
Thanks
Additional details.
You can verify if this bug impacts you by running
‘which dkms’ after step 4. If the response is ‘no dkms found’
if everything works correctly, vbox should be listed when you ‘dkms status’ after step 5. The output should look something like this
vboxhost, 4.1.16, 3.3.7-1.fc17.x86_64, x86_64: installed
Hi Vaidya Bala,
Thank you very much for this information and hopefully this is fixed soon… :)
Excellent instructions
It was failing to run my VM on FC17 till i installed dkms
The VirtualBox was running even without dkms but would fail to start VM
Now after following these instructions it is all good
Thanks for a great job
Just to say thanks… I was having problems running Virtualbox! Now its working fine :)
Hi there, I am facing a problem with running the command /etc/init.d/vboxdrv setup. See error and logs below:
[[email protected] ~]# /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 DKMSError! Bad return status for module build on kernel: 3.4.0-1.fc17.x86_64 (x86_64)
Consult /var/lib/dkms/vboxhost/4.1.16/build/make.log for more information.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
[[email protected] ~]#
Then the logs:
[[email protected] ~]# cat /var/lib/dkms/vboxhost/4.1.16/build/make.log
DKMS make.log for vboxhost-4.1.16 for kernel 3.4.0-1.fc17.x86_64 (x86_64)
Sat Jun 16 22:24:53 BRT 2012
make: Entering directory `/usr/src/kernels/3.4.0-1.fc17.x86_64′
/usr/src/kernels/3.4.0-1.fc17.x86_64/arch/x86/Makefile:81: stack protector enabled but no compiler support
make: gcc: Command not found
LD /var/lib/dkms/vboxhost/4.1.16/build/built-in.o
LD /var/lib/dkms/vboxhost/4.1.16/build/vboxdrv/built-in.o
CC [M] /var/lib/dkms/vboxhost/4.1.16/build/vboxdrv/linux/SUPDrv-linux.o
/bin/sh: gcc: command not found
make[2]: *** [/var/lib/dkms/vboxhost/4.1.16/build/vboxdrv/linux/SUPDrv-linux.o] Error 127
make[1]: *** [/var/lib/dkms/vboxhost/4.1.16/build/vboxdrv] Error 2
make: *** [_module_/var/lib/dkms/vboxhost/4.1.16/build] Error 2
make: Leaving directory `/usr/src/kernels/3.4.0-1.fc17.x86_64′
[[email protected] ~]#
And the other log:
[[email protected] ~]# cat /var/log/vbox-install.log
Uninstalling modules from DKMS
removing old DKMS module vboxhost version 4.1.16
——————————
Deleting module version: 4.1.16
completely from the DKMS tree.
——————————
Done.
Attempting to install using DKMS
Creating symlink /var/lib/dkms/vboxhost/4.1.16/source ->
/usr/src/vboxhost-4.1.16
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping…
Building module:
cleaning build area….
make KERNELRELEASE=3.4.0-1.fc17.x86_64 -C /lib/modules/3.4.0-1.fc17.x86_64/build M=/var/lib/dkms/vboxhost/4.1.16/build….(bad exit status: 2)
Failed to install using DKMS, attempting to install without
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/3.4.0-1.fc17.x86_64/build modules
/usr/src/kernels/3.4.0-1.fc17.x86_64/arch/x86/Makefile:81: stack protector enabled but no compiler support
make[1]: gcc: Command not found
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo ” ERROR: Kernel configuration is invalid.”; \
echo ” include/generated/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 -I/usr/src/kernels/3.4.0-1.fc17.x86_64/arch/x86/include -Iarch/x86/include/generated -Iinclude -include /usr/src/kernels/3.4.0-1.fc17.x86_64/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-red-zone -mcmodel=kernel -maccumulate-outgoing-args -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -I/lib/modules/3.4.0-1.fc17.x86_64/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_AMD64 -DVBOX_WITH_64_BITS_GUESTS -DMODULE -D”KBUILD_STR(s)=#s” -D”KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)” -D”KBUILD_MODNAME=KBUILD_STR(vboxdrv)” -c -o /tmp/vbox.0/linux/SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
/bin/sh: gcc: command not found
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 127
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2
[[email protected] ~]#
I read something about enabling hardware -v on BIOS, but I could not find it on my BIOS.. is this error related? Any idea?
Thanks in advance!
Hi
I looks like you are missing gcc. Please read step #4 and start from there.
I am not sure what is your host os. If it is Centos or RHEL you have to give 1st and 2nd command of step #4.
If it is fedora just execute command 2 in step#4.
If it is 32 bit PAE kernel, execute command 3 in step #4.
The above instructions work without fail. Just re-read it from the beginning once again and execute them in the order.
Good luck.
True… second command solved my problem… Thank you guys for the help… This was awesome!!!
Thanks a lot , worked without any issues.
i set up the KERN_DIR as directed, but there is nothing in the directory /usr/src/kernels on my load of CENTOS 6. Can you help please
To answer my own question, somehow I missed a step, after some reading I
yum install gcc kernel-devel kernel-headers
and everything worked.
Thank You for an excellent step by step tutorial.
I use to struggle for hours installing this on Fedora! This is great, i am saving this page! Thanks
SOS:
MyLinux is Fedora17 32bit
uname -r
3.5.3-1.fc17.i686.PAE
I made it as mentioned, but it fail to start.
yum install VirtualBox-4.1
……
service vboxdrv setup
Stopping VirtualBox kernel modules [ ok ]
Uninstalling old VirtualBox DKMS kernel modules [ ok ]
Trying to register the VirtualBox kernel modules using DKMS[fail]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [fail]
(Look at /var/log/vbox-install.log to find out what went wrong)
/var/log/vbox-install.log
Makefile:172: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again。 stop。
then I set the KERN_DIR and export it
KERN_DIR=/usr/src/kernels/`uname -r`
export KERN_DIR
pls help me
Hi Matthews,
Could you post output of following commands:
I am glad to hear from you. details that I execute orders like blow:
[[email protected] ~]# ls -la /usr/src/kernels/
æ€»ç”¨é‡ 8
drwxr-xr-x. 2 root root 4096 2月 3 2012 .
drwxr-xr-x. 4 root root 4096 9月 12 22:21 ..
[[email protected] ~]# rpm -qa kernel* |sort
kernel-PAE-3.3.4-5.fc17.i686
kernel-PAE-3.5.3-1.fc17.i686
[[email protected] ~]#
Pls help me. wait for your reply. thanks a lot.
I am glad to hear from you. details that I execute orders like blow:
[[email protected] ~]# ls -la /usr/src/kernels/
æ€»ç”¨é‡ 8
drwxr-xr-x. 2 root root 4096 2月 3 2012 .
drwxr-xr-x. 4 root root 4096 9月 12 22:21 ..
[[email protected] ~]# rpm -qa kernel* |sort
kernel-PAE-3.3.4-5.fc17.i686
kernel-PAE-3.5.3-1.fc17.i686
[[email protected] ~]#
Pls help me. wait for your reply. thanks a lot.
Hi Matthews,
Did you installed following packages on step 4.?
Try to install those again. And then post output of following commands again:
You are so nice, I made it. Thanks for your help.
The other question is how to intall virtualbox in CentOS6 . My company LAN cann’t connect to Internet. Is there Rpm that can be installed without Internet?
Hi Matthews,
You are very welcome!
You can download VirtualBox RPMs directly from here:
VirtualBox 4.2.0 32-bit
VirtualBox 4.2.0 64-bit
Then you need also all other packages from here:
CentOS 6 32-bit mirrors
CentOS 6 64-bit mirrors
thanks a lot
Hi JR
I downloaded the file from your link but it gives an error that some files are missing..
is there any way in which the package is directly downloaded and then it is been automatically installed with whatever packages it need.
stuck at step 3, output versions do not match.
[[email protected] yum.repos.d]# rpm -qa kernel |sort |tail -n 1
kernel-3.5.4-2.fc17.x86_64
[[email protected] yum.repos.d]# uname -r
3.3.4-5.fc17.x86_64
any help would be greatly appreciated.
stuck at step 3, output versions do not match.
[[email protected] yum.repos.d]# rpm -qa kernel |sort |tail -n 1
kernel-3.5.4-2.fc17.x86_64
[[email protected] yum.repos.d]# uname -r
3.3.4-5.fc17.x86_64
any help would be greatly appreciated.
I also can not run
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.3.4-5.fc17.x86_64 cannot be found at
/lib/modules/3.3.4-5.fc17.x86_64/build or /lib/modules/3.3.4-5.fc17.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)
i may had installed vbox and vmware before everything, and am trying to solve the problem of not being able to create a virtual machine in vbox, and in vmware i can not run i due to missing headers supposedly but i have latest version 3.5 or so and i asks for 3.3 or so
Hi sergis,
Update your system with following command:
And then reboot with kernel-3.5.4:
And then check again and output of commands (on step 3) should match.
i attempted this, but recieved this:
[[email protected] x3rz1x]# yum update kernel
Loaded plugins: langpacks, presto, refresh-packagekit
No Packages marked for Update
So then you have latest version installed and then just reboot and select 3.5.4 kernel.
Thank you, It works for me on Fedora 17.
[…] Reference:Â http://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-on-fedora-centos-red-hat-rhel… […]