在 Kali Linux 中安装 VirtualBox 时出错

在 Kali Linux 中安装 VirtualBox 时出错

我正在尝试在 Kali 中安装 VB。我输入:

echo "deb http://download.virtualbox.org/virtualbox/debian vivid contrib" >> /etc/apt/sources.list.d/virtualbox.list
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
apt-get update
apt-get install virtualbox-5.0

但输出是:

root@kali:/# apt-get install virtualbox-5.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 virtualbox-5.0 : Depends: libpng12-0 (>= 1.2.13-4) but it is not installable
                  Depends: libsdl1.2debian (>= 1.2.11) but it is not installable
                  Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
                  Depends: libvpx1 (>= 1.0.0) but it is not installable
                  Recommends: libsdl-ttf2.0-0 but it is not installable
                  Recommends: dkms but it is not installable
                  Recommends: linux-headers but it is not installable
E: Unable to correct problems, you have held broken packages.

有谁知道发生了什么事吗?谢谢。

答案1

据官方称网站,需要dkms先安装:

sudo apt-get install dkms
sudo apt-get update
sudo apt-get install virtualbox-5.1

Ubuntu/Debian 用户可能希望安装该dkms软件包,以确保在下次 apt-get 升级期间 Linux 内核版本发生更改时,VirtualBox 主机内核模块(vboxdrv、vboxnetflt 和 vboxnetadp)能够正确更新。对于 Debian,它可以在 Lenny 向后移植以及 Squeeze 及更高版本的普通存储库中使用。

编辑

Kali linux 是一个基于 Debian 的发行版,要添加 virtual-box 源,您应该输入(而不是debian vivid):

echo "deb http://download.virtualbox.org/virtualbox/debian jessie contrib" > /etc/apt/sources.list.d/vbox.list

需要安装一些依赖项:

wget http://http.us.debian.org/debian/pool/main/libv/libvpx/libvpx1_1.3.0-3_amd64.deb
wget http://http.us.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.50-2+deb8u2_amd64.deb
wget http://http.us.debian.org/debian/pool/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u2_amd64.deb
wget http://http.us.debian.org/debian/pool/main/s/sdl-ttf2.0/libsdl-ttf2.0-0_2.0.11-3_amd64.deb

安装依赖项:

dpkg -i libpng12-0_1.2.50-2+deb8u2_amd64.deb
dpkg -i libvpx1_1.3.0-3_amd64.deb
dpkg -i libssl1.0.0_1.0.1t-1+deb8u2_amd64.deb
dpkg -i libsdl-ttf2.0-0_2.0.11-3_amd64.deb

假设您已经安装了dkmslinux-headers,您可以通过命令行或下载安装 vitrualbox,deb如下所示:

http://download.virtualbox.org/virtualbox/5.1.4/virtualbox-5.1_5.1.4-110228~Debian~jessie_amd64.deb
dpkg -i virtualbox-5.1_5.1.4-110228~Debian~jessie_amd64.deb

相关内容