//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
物理机系统为ubuntu11.04_X64
1、最新版(源码)下载地址:
# wget http://download.virtualbox.org/virtualbox/4.1.0/VirtualBox-4.1.0.tar.bz2
https://www.virtualbox.org/wiki/Download_Old_Builds_4_1
http://dlc.sun.com.edgesuite.net/virtualbox/4.0.16/VirtualBox-4.0.16.tar.bz2
2、编译前条件安装
参考:http://www.virtualbox.org/wiki/Linux build instructions
# apt-get install gcc g++ bcc iasl xsltproc uuid-dev zlib1g-devlibidl-dev libsdl1.2-dev libxcursor-dev libasound2-dev libstdc++5libhal-dev libpulse-dev libxml2-dev libxslt1-dev python2.6-devlibqt4-dev qt4-dev-tools libcap-dev libxmu-dev mesa-common-devlibglu1-mesa-dev linux-kernel-headers libcurl4-openssl-devlibpam0g-dev libxrandr-dev libxinerama-dev libqt4-opengl-devmakeself ia32-libs libc6-dev-i386 lib32gcc1 gcc-multiliblib32stdc++6 g++-multilib mkisofs
# ln -s libX11.so.6 /usr/lib32/libX11.so
ln -s libXTrap.so.6 /usr/lib32/libXTrap.so
# ln -s libXt.so.6 /usr/lib32/libXt.so
# ln -s libXtst.so.6 /usr/lib32/libXtst.so
# ln -s libXmu.so.6 /usr/lib32/libXmu.so
# ln -s libXext.so.6 /usr/lib32/libXext.so
3、安装
下载路径为:/opt
# tar xvf VirtualBox-4.1.0.tar.gz2
# cd VirtualBox-4.1.0_OSE
# ./configure --disable-hardening --disable-java--disable-docs
如果报如下错误:
Checking for Mesa / GLU:Segmentation fault
则需跟上--passive-mesa
# source ./env.sh
# kmk all
# cd out/linux.amd64/release/bin/src
# make
# make install
# modprobe vboxdrv
# cd ../
#./VirtualBox启动
4、修改环境变量添加VirtualBox命令
# vi /etc/profile
最后添加
PATH=$PATH:/opt/VirtualBox-4.1.0_OSE/out/linux.amd64/release/bin
# source /etc/profile