Ubuntu 14.04使用命令行安装VirtualBox
基本安装命令:
#sudo sh -c ‘echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" >> /etc/apt/sources.list‘
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 54422A4B98AB5139
#sudo apt-get update
#sudo apt-get install virtualbox-4.3
中途遇到坑:
遭遇报错:
work@databackup:~/vbox$ sudo apt-get install virtualbox-4.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
virtualbox-4.3 is already the newest version.
You might want to run ‘apt-get -f install‘ to correct these:
The following packages have unmet dependencies:
virtualbox-4.3 : Depends: libgl1-mesa-glx or
libgl1
Depends: libqt4-network (>= 4:4.5.3) but it is not going to be installed
Depends: libqt4-opengl (>= 4:4.7.2) but it is not going to be installed
Depends: libqtcore4 (>= 4:4.8.0) but it is not going to be installed
Depends: libqtgui4 (>= 4:4.8.0) but it is not going to be installed
Depends: libsdl1.2debian (>= 1.2.11) but it is not going to be installed
Depends: libvpx1 (>= 1.0.0) but it is not going to be installed
Depends: libxcursor1 (> 1.1.2) but it is not going to be installed
Depends: libxinerama1 but it is not going to be installed
Depends: libxmu6 but it is not going to be installed
Depends: libxt6 but it is not going to be installed
Recommends: libasound2
Recommends: libpulse0 but it is not going to be installed
Recommends: libsdl-ttf2.0-0 but it is not going to be installed
Recommends: dkms but it is not going to be installed
Recommends: gcc but it is not going to be installed
Recommends: make
Recommends: binutils but it is not going to be installed
Recommends: pdf-viewer
Recommends: libgl1
E: Unmet dependencies. Try ‘apt-get -f install‘ with no packages (or specify a solution).
解决方法:
sudo apt-get purge virtualbox-4.3
问题原因分析:
怀疑是上一次安装virtualbox不完整导致的问题。
启动xmanager passive
export DISPLAY=192.168.1.117:0.0
加载虚拟机镜像:
Machine-->Add-->选择虚拟机镜像文件
如果镜像硬盘位置与之前不同,重新添加虚拟机硬盘时候会提示UUID重复问题,使用以下命令解决:
vboxmanage internalcommands sethduuid /home/work/vbox/disk_win2008_sql.vdi
添加extension pack包:
file->preference...->extensions-->选择要添加的 extension pack
本文出自 “文化流氓的DBA生活” 博客,请务必保留此出处http://suntongle.blog.51cto.com/1129224/1652693
原文地址:http://suntongle.blog.51cto.com/1129224/1652693