如何在ubuntu 11.04中流畅安装virtualbox-4.1.4?
当 apt-get install libqt* 未满足依赖项时。有一长串未满足的依赖项。首先从哪里开始以及任何命令都可以流畅地安装 virtualbox?
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
virtualbox-4.1 : Depends: libcurl3 (>= 7.16.2-1) but it is not going to be installed
Depends: libqt4-network (>= 4:4.5.3) but it is not going to be installed
Depends: libqt4-opengl (>= 4:4.7.0~rc1) but it is not going to be installed
Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not going to be installed
Depends: libqtgui4 (>= 4:4.7.0~beta1) 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: libhal1 (>= 0.5) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
答案1
在任何 Ubuntu 版本上安装 virtualbox 4.1
您需要编辑 /etc/apt/sources.list
gksudo gedit /etc/apt/sources.list
添加以下行
根据您的发行版,将以下其中一行添加到您的 /etc/apt/sources.list:
deb http://download.virtualbox.org/virtualbox/debian oneiric contrib
deb http://download.virtualbox.org/virtualbox/debian natty contrib
deb http://download.virtualbox.org/virtualbox/debian maverick contrib non-free
deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free
deb http://download.virtualbox.org/virtualbox/debian karmic contrib non-free
deb http://download.virtualbox.org/virtualbox/debian hardy contrib non-free
deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
deb http://download.virtualbox.org/virtualbox/debian lenny contrib non-free
保存并退出文件
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
更新源列表
sudo apt-get 更新
安装 virtualbox
sudo apt-get install virtualbox-4.1
注意:Ubuntu/Debian 用户可能需要安装 dkms 包,以确保在下一次 apt-get 升级期间 Linux 内核版本发生变化时,VirtualBox 主机内核模块(vboxdrv、vboxnetflt 和 vboxnetadp)能够正确更新。对于 Debian,它可在 Lenny backports 和 Squeeze 及更高版本的常规存储库中找到。dkms 包可以通过 Synaptic 包管理器或以下命令安装:
sudo apt-get install dkms
答案2
你也可以尝试使用 PPA 获取最新更新,请参阅http://www.ubuntuupdates.org/ppas/7。
sudo add-apt-repository ppa:debfx/virtualbox
sudo apt-get update
sudo apt-get install virtualbox