在 Linux Mint 17 上安装 Virtualbox

在 Linux Mint 17 上安装 Virtualbox

我正在尝试在 mint 上安装 virtualbox 5。这是输出

$ sudo aptitude install virtualbox-5.0
The following NEW packages will be installed:
  virtualbox-5.0{b} 
0 packages upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 64.2 MB of archives. After unpacking 161 MB will be used.
The following packages have unmet dependencies:
 virtualbox-5.0 : Depends: libdevmapper1.02.1 (>= 2:1.02.99) but 2:1.02.77-6ubuntu2 is installed.
                  Depends: libstdc++6 (>= 5.2) but 4.8.4-2ubuntu1~14.04.1 is installed.
                  Depends: libvpx2 (>= 1.4.0) which is a virtual package.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     virtualbox-5.0 [Not Installed]                     



Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

依赖关系出了什么问题?

输出sudo apt-cache policy virtualbox virtualbox-5.0 libdevmapper1.02.1 libstdc++6 libvpx2

sudo apt-cache policy virtualbox virtualbox-5.0 libdevmapper1.02.1 libstdc++6 libvpx2
virtualbox:
  Installed: (none)
  Candidate: 4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1
  Version table:
     4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/multiverse amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/multiverse amd64 Packages
     4.3.10-dfsg-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages
virtualbox-5.0:
  Installed: (none)
  Candidate: 5.0.16-105871~Ubuntu~wily
  Version table:
     5.0.16-105871~Ubuntu~wily 0
        700 http://download.virtualbox.org/virtualbox/debian/ wily/contrib amd64 Packages
     5.0.2-102096~Ubuntu~trusty 0
        700 http://extra.linuxmint.com/ qiana/main amd64 Packages
libdevmapper1.02.1:
  Installed: 2:1.02.77-6ubuntu2
  Candidate: 2:1.02.77-6ubuntu2
  Version table:
 *** 2:1.02.77-6ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
libstdc++6:
  Installed: 4.8.4-2ubuntu1~14.04.1
  Candidate: 4.8.4-2ubuntu1~14.04.1
  Version table:
 *** 4.8.4-2ubuntu1~14.04.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     4.8.2-19ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
libvpx2:
  Installed: (none)
  Candidate: (none)
  Version table:

输出sudo apt-get install virtualbox-5

sudo 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: libdevmapper1.02.1 (>= 2:1.02.99) but 2:1.02.77-6ubuntu2 is to be installed
                  Depends: libstdc++6 (>= 5.2) but 4.8.4-2ubuntu1~14.04.1 is to be installed
                  Depends: libvpx2 (>= 1.4.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

答案1

要安装 virtualbox,请按照下列步骤操作:

  1. sudo apt-get remove virtualbox virtualbox-4.* virtualbox-5.0
  2. 下载虚拟机​​。
  3. sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian [name of your distribution] contrib" >> /etc/apt/sources.list.d/virtualbox.list
  4. wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

这个答案摘自这里

`

答案2

尝试删除download.virtualbox.org来源。我会坚持使用您的发行版的软件包,除非您有令人信服的理由要切换

答案3

编辑/etc/apt/sources.list文件并添加以下行之一:

deb http://download.virtualbox.org/virtualbox/debian trusty contrib

保存并退出

更新使用:sudo apt-get update

根据virtualbox_wiki你需要安装dkms

sudo apt-get install dkms

设置oracle公钥:

wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
sudo apt-key add oracle_vbox.asc

安装 Oracle VirtualBox

sudo apt-get update
sudo apt-get install virtualbox-5.0

相关内容