Hello,
I am new to Linux and need help. I am trying to install VirtualBox on a Linux server and get an error when i run the command.
/etc/init.d/vboxdrv setup
Error Message:
*** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
Echo $KERN_DIR returns nothing.....
When i type KERN_DIR=/usr/src/kernels/$(uname -r) ; echo $KERN_DIR; ls -ld $KERN_DIR
I get this error message.
/usr/src/kernels/2.6.39-400.294.2.el6uek.x86_64
ls: cannot access /usr/src/kernels/2.6.39-400.294.2.el6uek.x86_64: No such file or directory
Can you please help me resolve this.
From other recommendation on the web i ran the following commands rpm -qa kernel* | sort & uname -mr the output is listed below.
rpm -qa kernel* | sort
kernel-2.6.32-358.el6.x86_64
kernel-2.6.32-642.13.1.el6.x86_64
kernel-devel-2.6.32-642.13.1.el6.x86_64
kernel-firmware-2.6.32-642.13.1.el6.noarch
kernel-headers-2.6.32-642.13.1.el6.x86_64
kernel-uek-2.6.39-400.17.1.el6uek.x86_64
kernel-uek-2.6.39-400.294.2.el6uek.x86_64
kernel-uek-devel-4.1.12-61.1.27.el6uek.x86_64
kernel-uek-firmware-2.6.39-400.17.1.el6uek.noarch
kernel-uek-firmware-2.6.39-400.294.2.el6uek.noarch
kernel-uek-headers-1-3.el6.x86_64
[root@linuxhost ~]# uname -mr
2.6.39-400.294.2.el6uek.x86_64 x86_64
[root@linuxhost ~]# echo "$KERN_DIR"
Thanks
SoJee
Unable to Install VBOX on OEL 6.4
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Unable to Install VBOX on OEL 6.4
kernel-devel and kernel-headers must match the running kernel. use the "-$(uname -r)" tag to make sure to install the proper ones.
Re: Unable to Install VBOX on OEL 6.4
Hello,
Thanks for the reply. since i am new to all this please bear with me.
when i run uname -mr i get the below information.
[root@linuxhost ~]# uname -mr
2.6.39-400.294.2.el6uek.x86_64 x86_64
which probably means I am running 2.6.39-400.294.2.el6uek.x86_64 x86_64, so how do i install that specific version ? can you please show me the exact command ? also should i then remove the other versions ? if so how ?
should i say yum install kernel-headers-2.6.39-400.294.2.el6uek.x86_64 x86_64 and kernel-devel-2.6.39-400.294.2.el6uek.x86_64 x86_64
Appreciate your help!
Thanks!
Thanks for the reply. since i am new to all this please bear with me.
when i run uname -mr i get the below information.
[root@linuxhost ~]# uname -mr
2.6.39-400.294.2.el6uek.x86_64 x86_64
which probably means I am running 2.6.39-400.294.2.el6uek.x86_64 x86_64, so how do i install that specific version ? can you please show me the exact command ? also should i then remove the other versions ? if so how ?
should i say yum install kernel-headers-2.6.39-400.294.2.el6uek.x86_64 x86_64 and kernel-devel-2.6.39-400.294.2.el6uek.x86_64 x86_64
Appreciate your help!
Thanks!
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Unable to Install VBOX on OEL 6.4
Code: Select all
yum install kernel-headers-$(uname -r) kernel-devel-$(uname -r)
Re: Unable to Install VBOX on OEL 6.4
Thank you very much! i will do that and let you know. should i remove the other kernel packages ?
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Unable to Install VBOX on OEL 6.4
That's as always is up to you. I would suggest that you don't get carried away doing so until you are sure everything is working properly with all the new packages first.
Re: Unable to Install VBOX on OEL 6.4
this command does not bring back any packages !
[root@linuxhost ~]# yum install kernel-headers-$(uname -r) kernel-devel-$(uname -r)
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
No package kernel-headers-2.6.39-400.294.2.el6uek.x86_64 available.
No package kernel-devel-2.6.39-400.294.2.el6uek.x86_64 available.
Error: Nothing to do
[root@linuxhost ~]#
[root@linuxhost ~]# yum install kernel-headers-$(uname -r) kernel-devel-$(uname -r)
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
No package kernel-headers-2.6.39-400.294.2.el6uek.x86_64 available.
No package kernel-devel-2.6.39-400.294.2.el6uek.x86_64 available.
Error: Nothing to do
[root@linuxhost ~]#
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Unable to Install VBOX on OEL 6.4
No package kernel-headers-2.6.39-400.294.2.el6uek.x86_64 available.
No package kernel-devel-2.6.39-400.294.2.el6uek.x86_64 available.
The above is your real problem. The devel and headers are not available for your running kernel. So your options are to find them or downgrade the kernel to one that is available. You will need to contact the host OS forum for the answers to that though.
No package kernel-devel-2.6.39-400.294.2.el6uek.x86_64 available.
The above is your real problem. The devel and headers are not available for your running kernel. So your options are to find them or downgrade the kernel to one that is available. You will need to contact the host OS forum for the answers to that though.
Re: Unable to Install VBOX on OEL 6.4
after some research i edited the grub.conf to force the OS to use a lower version kernel-2.6.32-642.13.1.el6.x86_64. now when i do uname -r it shows me lower version of kernel.
Now i have the kernel, kernel-devel and kernel-headers of the same release/verions. although it is not UEk. so now i will try to uninstall VirtualBox and try to reinstall it. will keep you posted. Thanks for your help.
kernel-2.6.32-642.13.1.el6.x86_64
kernel-devel-2.6.32-642.13.1.el6.x86_64
kernel-headers-2.6.32-642.13.1.el6.x86_64
Now i have the kernel, kernel-devel and kernel-headers of the same release/verions. although it is not UEk. so now i will try to uninstall VirtualBox and try to reinstall it. will keep you posted. Thanks for your help.
kernel-2.6.32-642.13.1.el6.x86_64
kernel-devel-2.6.32-642.13.1.el6.x86_64
kernel-headers-2.6.32-642.13.1.el6.x86_64