Saturday, September 26, 2009

Install Virtual Box in your Linux machine

Here is a quick way to install VirtualBox in your linux PC.

The Preparation

Before you begin installing, I would suggest upgrading your PC

Fedora/RHEL/CentOS users can run
yum update -y

For Debian/Ubuntu sudo apt-get upgrade

Next, Install build-essential, Linux headers

For Ubuntu/Debian
sudo apt-get install build-essential linux-headers-generic

Fedora/RHEL/CentOS may need the following packages:
    binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel

You may install then all with yum
sudo yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel

Installation

Now install virtualbox from the repository

Fedora/RHEL/CentOS users
yum install virtualbox

Debian/Ubuntu users
sudo apt-get install virtualbox

If all goes well, you would be able to run Virtual Box now.

Common Error Messages

Error! Your kernel source for kernel -server cannot be found at /lib/modules/server/build or /lib/modules/server/source.

Starting VirtualBox kernel module...                                  [fail]

Possible causes: Correct version of linux headers are not installed

Resolution:

Install the correct headers

RHEL/Fedora/CentOS users
yum install linux-headers-$(uname -r)

Debian / Ubuntu  users
sudo apt-get install linux-headers-$(uname -r)

Remove and reinstall virtualbox again

RHEL/Fedora/CentOS users
yum remove virtualbox
yum install virtualbox


Debian / Ubuntu  users
sudo apt-get remove virtualbox
sudo apt-get install virtualbox

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.