VirtualBox 6.1.28 / 6.1.29 on Fedora 35/34/33, CentOS/RHEL 8/7 - Comment Page: 5
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...
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.
Hi acc,
Did you check this guide troubleshooting section?
Worked great thanks
i’ve follow all tutorial mr.JR …
btw here
uname -r
3.1.0-7.fc16.x86_64
[[email protected] bob]# KERN_DIR=/usr/src/kernels/3.1.0-7.fc16.x86_64
[[email protected] 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)
[[email protected] bob]# uname -r
3.1.0-7.fc16.x86_64
[[email protected]]# export KERN_DIRN
[[email protected]]#KERN_DIR=/usr/src/kernels/3.1.0-7.fc16.x86_64
[[email protected]]# 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)
Hi acc,
First make sure that you have latest packages and needed dependencies on your system:
Then install and setup VirtualBox:
Do you get still some errors?
Great …. Ty for helping me Mr.JR …
You are welcome, nice to hear that you get it working! :)
Works great, thanks!
I’m constantly getting the same error again and again. I’m using Fedora 15 and have followed this tutorial 3 times and read all comments yet still not joy.
Running /etc/init.d/vboxdrv setup give me an output off
Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules/etc/init.d/vboxdrv: line 304: /var/log/vbox-install.log: Permission denied
[ 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/etc/init.d/vboxdrv: line 327: /var/log/vbox-install.log: Permission denied
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules/etc/init.d/vboxdrv: line 331: /var/log/vbox-install.log: Permission denied
[FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
My vbox-install.log has over 250 lines, didn’t fancy pasting it here. Anyway I can get it to you to sort this annoying problem?
Hi Speedy,
Are you running /etc/init.d/vboxdrv setup as root or as normal user? You shouldn’t get any Permission denied errors when you run it as root.
thank you
Same problem, followed the instructions several times, using root, everything is up-to-date. vbox-install.log is also with over 200 lines:
[[email protected] yum.repos.d]# /etc/init.d/vboxdrv setup
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 DKMSError! Bad return status for module build on kernel: 2.6.41.1-1.fc15.i686.PAE (i686)
Consult /var/lib/dkms/vboxhost/4.1.6/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)
Hi Victor,
Please post output of following command:
And you can paste whole /var/lib/dkms/vboxhost/4.1.6/build/make.log and /var/log/vbox-install.log here (I can shorten/remove those later, if needed). :)
output:
gcc-4.6.1-9.fc15.i686
dkms-2.2.0.2-1.fc15.noarch
/var/lib/dkms/vboxhost/4.1.6/build/make.log:
DKMS make.log for vboxhost-4.1.6 for kernel 2.6.41.1-1.fc15.i686.PAE (i686)
Thu Dec 1 11:18:05 EET 2011
make: Entering directory `/usr/src/kernels/2.6.41.1-1.fc15.i686.PAE’
LD /var/lib/dkms/vboxhost/4.1.6/build/built-in.o
LD /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/built-in.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/linux/SUPDrv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/SUPDrv.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/SUPDrvSem.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/alloc-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/initterm-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/memobj-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/mpnotification-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/powernotification-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/assert-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/initterm-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o
/var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeLockKernel’:
/var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:910:12: warning: comparison between pointer and
/var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:910:58: warning: comparison between pointer and
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/memuserkernel-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/mp-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/r0drv/linux/mpnotification-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/misc/handletable.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/misc/handletablectx.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/misc/thread.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/RTStrCopyP.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strformat.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strformatrt.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strformattype.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strprintf.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strtonum.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/misc/handletable.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/misc/handletablectx.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/misc/thread.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/RTStrCopyP.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strformat.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strformatrt.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strformattype.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strprintf.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strtonum.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/misc/handletable.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/misc/handletablectx.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/misc/thread.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/RTStrCopyP.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strformat.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strformatrt.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strformattype.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strprintf.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxdrv/common/string/strtonum.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxnetflt/linux/SUPR0IdcClient-linux.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxnetflt/math/gcc/divdi3.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxnetflt/math/gcc/moddi3.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxnetflt/math/gcc/qdivrem.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxnetflt/math/gcc/udivdi3.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxnetflt/math/gcc/umoddi3.o
LD [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxnetflt/vboxnetflt.o
LD /var/lib/dkms/vboxhost/4.1.6/build/vboxpci/built-in.o
CC [M] /var/lib/dkms/vboxhost/4.1.6/build/vboxpci/linux/VBoxPci-linux.o
/var/lib/dkms/vboxhost/4.1.6/build/vboxpci/linux/VBoxPci-linux.c:39:28: fatal error: asm/amd_iommu.h: No such file or direct
compilation terminated.
make[2]: *** [/var/lib/dkms/vboxhost/4.1.6/build/vboxpci/linux/VBoxPci-linux.o] Error 1
make[1]: *** [/var/lib/dkms/vboxhost/4.1.6/build/vboxpci] Error 2
make: *** [_module_/var/lib/dkms/vboxhost/4.1.6/build] Error 2
make: Leaving directory `/usr/src/kernels/2.6.41.1-1.fc15.i686.PAE’
/var/log/vbox-install.log:
ninstalling 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.
Kernel preparation unnecessary for this kernel. Skipping…
Building module:
cleaning build area….
make KERNELRELEASE=2.6.41.1-1.fc15.i686.PAE -C /lib/modules/2.6.41.1-1.fc15.i686.PAE/build M=/var/lib/dkms/vboxhost/4.1.6/bu
Failed to install using DKMS, attempting to install without
Makefile:181: *** Error: KERN_DIR does not point to a directory. Stop.
i assume this ” KERN_DIR does not point to a directory.” could be an issue, not sure.
thanks anyway.
Hi Victor,
This actually found on troubleshooting section, but try following (as root):
Hi,Jr
Nope, same problem :(
Strange, but I just checked your make.log error message again and looks like that amd_iommu.h file is missing on kernel sources.
Please run first following command (as root):
And then post output of following commands here:
i’m new to linux, so maybe there is a obvious error and i don’t see it. or maybe the path to the right kernel isn’t set.
locate amd_iommu.h runs well, no error
host -a
Linux victor.****-**.*** 2.6.41.1-1.fc15.i686.PAE #1 SMP Fri Nov 11 21:43:42 UTC 2011 i686 i686 i386 GNU/Linux
rpm -qa kernel*
kernel-PAE-2.6.41.1-1.fc15.i686
kernel-devel-2.6.41.1-1.fc15.i686
kernel-headers-2.6.41.1-1.fc15.i686
kernel-PAE-2.6.40.6-0.fc15.i686
kernel-PAE-2.6.40.4-5.fc15.i686
kernel-2.6.41.1-1.fc15.i686
kernel-PAE-devel-2.6.41.1-1.fc15.i686
There :)
Thanks and no problems Victor, let’s try to together solve this problem. :)
So you run first updatedb command as root?
And then locate amd_iommu.h command doesn’t give any output?
Let’s check following things also, please post output of following commands also:
Yes, i did that, as root :). No output :)
ls -la /usr/src/kernels/*/arch/x86/include/asm/*iommu.h :
-rw-r–r–. 1 root root 293 Oct 24 10:10 /usr/src/kernels/2.6.41.1-1.fc15.i686/arch/x86/include/asm/iommu.h
-rw-r–r–. 1 root root 293 Oct 24 10:10 /usr/src/kernels/2.6.41.1-1.fc15.i686.PAE/arch/x86/include/asm/iommu.h
uname -r :
2.6.41.1-1.fc15.i686.PAE
echo $KERN_DIR :
/usr/src/kernels/2.6.41.1-1.fc15.i686.PAE
Thanks again. :)
I just checked that the amd_iommu.h file location is changed on Kernel 2.6.41 and looks like that the VirtualBox try to use old location. One quick / temporary fix for this could be symlinking new amd-iommu.h to old amd_iommu.h location with following command:
Then following command, should return one row (which is symbolic link to /usr/src/kernels/2.6.41.1-1.fc15.i686.PAE/include/linux/amd-iommu.h):
Then you could try to run (as root):
Or if this fail then reboot your system and run again all following commands (as root):
Please let me know, is it working? :)
Yeeeeeesssss, it’s working! Thank you very very much, JR!
Excellent! :D You are welcome! :)
And if Fedora 15 get kernel update and it breaks your VirtualBox then following might be usefull:
1. Reboot with new kernel
2. Create new symlink
3. Run vboxdrv setup with KERN_DIR parameter
;D
Hi, I’m getting this error after following the tutorial.
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.1.0-7.fc16.i686) or it failed to load. Please recompile the kernel module and install it by sudo /etc/init.d/vboxdrv setup
I’ve followed these steps:
KERN_DIR=/usr/src/kernels/`uname -r`
export KERN_DIR
/etc/init.d/vboxdrv setup
any suggestions? part of the warning msg says it can’t run VMs until this is fixed :(
Hi GDora,
Please post output of following commands:
Hi JR,
The rpm output:
kernel-3.1.0-7.fc16.i686
kernel-3.1.2-1.fc16.i686
kernel-devel-3.1.2-1.fc16.i686
kernel-headers-3.1.2-1.fc16.i686
The uname output:
Linux local.domain 3.1.0-7.fc16.i686 #1 SMP Tue Nov 1 21:00:16 UTC 2011 i686 i686 i386 GNU/Linux
Thanks for helping, really appreciate it.
Your problem looks very simple, you are running 3.1.0-7.fc16.i686 kernel and your installed version of kernel-devel and
kernel-headers packages is 3.1.2-1.fc16.i686.
So just reboot your system, with newest kernel 3.1.2-1.fc16.i686 and then run following commands again:
Ok I’m happy to hear it’s a simple solution (hopefully!) but alas, I’m somewhat a newb… how do I boot with the newest kernel? normal reboot?
Could I trouble you to explain exactly what info I’ve posted? I mean what does the rpm output tell you? why is the first line different to the second one?
Thanks again
Yes normal reboot, I think that there is 5 second delay on default on grub where you can select kernel, but normally it’s first one. So currently select 3.1.2-1.fc16.i686, because it’s latest now. :)
Yes I can explain:
rpm output 2 first rows tells that you have two different kernel versions installed and 2 last rows tells that which version of kernel-devel and kernel-headers packages you have. :)
Then uname -a command tells info about your currently running system and example kernel version, which differ from installed kernel-devel and kernel-headers packages.
THANKS! will check results when I get home.
Worked like a bomb! Thank you kindly :)
Excellent! You are welcome! :)
Hi… me again. One re-install of F16 later (unrelated matter – don’t even ask) and I’m stuck at the same point – failing making kernels.
The rpm-qa kernel* |sort output now is:
kernel-3.1.0-7.fc16.i686
kernel-3.1.2-1.fc16.i686
The uname -a output is:
Linux localhost.localdomain 3.1.2-1.fc16.i686 #1 SMP Tue Nov 22 08:56:28 UTC 2011 i686 i686 i386 GNU/Linux
The logfile error from /var/log/vbox-install.log:
Makefile:181: *** Error: KERN_DIR does not point to a directory. Stop.
I’ve tried rebooting… not sure what now?