linux-install-virtualbox-on-centos5
yum install elinks
elinks http://virtualbox.org
"browse" using the text browser in ssh to Downloads -> Virtualbox 3.0.4 for Linux hosts -> RHEL/Centos5
press enter on it and then choose to save it (tab key to navigate menus)
rpm -ivh VirtualBox-3.0.4_50677_rhel5-1.i386.rpm
If you get "error: Failed dependencies:" libxslt.so.1 is needed by VirtualBox-3.0.4_50677_rhel5-1.i386
THEN keep installing them with yum until done...
e.g. yum install libSDL-1.2.so.0 is needed by VirtualBox-3.0.4_50677_rhel5-1.i386
Occasionally when installing things they want the Kernel Headers (aka source) but it may not be installed...
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
IN DEBIAN / UBUNTU:
apt-cache search linux-headers-$(uname -r) sudo apt-get install linux-headers-$(uname -r)
BUT FOR YUM... virtualbox requires the following packages (note that uname -r matches the kernel-devel)
gcc glibc-devel glibc-headers kernel-headers
kernel-devel
APPEARED TO BE ALREADY INSTALLED binutils make patch libgomp
to be safe, as the first try didn't work I thought to uninstall it
rpm -e VirtualBox-3.0.4_50677_rhel5-1.i386.rpm
BUT it says "not installed"... AND when I try
rpm -ivh VirtualBox-3.0.4_50677_rhel5-1.i386.rpm
IT SAYS, "already installed"...
VBoxManage | more (all by itself) reveals the required correction
[root@centos5 ~]# VBoxManage | more WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (2.6.18-128.el5) 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.
/etc/init.d/vboxdrv setup
THIS of course gives me the error of /var/log/vbox-install.log
Makefile:147: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=$
hmmm.... maybe I should have "export KERN_DIR=/usr/src/kernels/2.6.18-128.4.1.el5-i686/"
[root@centos5 kernels]# export KERN_DIR=/usr/src/kernels/2.6.18-128.4.1.el5-i686/
[root@centos5 kernels]# /etc/init.d/vboxdrv setup Stopping VirtualBox kernel module [ OK ] Recompiling VirtualBox kernel module [ OK ] Starting VirtualBox kernel module [ OK ]
DONE.