virtualbox-5.0 não instala no servidor ubuntu 14.04.4

3

Não consigo instalar o VirtualBox.

Eu recentemente reinstalei todo o meu sistema com o ubuntu-server 14.04.4. Adicionei o repositório virtual como recomendado no site : Eu adicionei

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

ao meu sources.list, adicionei a chave e apt-get update -ed (todos funcionaram). Então fui para apt-get install virtualbox-5.0 e isso me deu esse erro:

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.90) but 2:1.02.77-6ubuntu2 is to be installed
                  Depends: libstdc++6 (>= 4.9) but 4.8.4-2ubuntu1~14.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

Eu tentei verificar todos os pacotes mantidos e usar o aptitude, como recomendado aqui .

apt-mark showhold não teve saída e aptitude afirmou que a única solução era não instalar virtualbox-5.0 :

gavinsyancey@boxen:~$ sudo aptitude install virtualbox-5.0
The following NEW packages will be installed:
  libaudio2{a} libmysqlclient18{a} libqt4-declarative{a} libqt4-network{a} libqt4-opengl{a} libqt4-script{a} libqt4-sql{a} libqt4-sql-mysql{a} libqt4-xml{a} libqt4-xmlpatterns{a} 
  libqtdbus4{a} libqtgui4{a} mysql-common{a} virtualbox-5.0{b} 
0 packages upgraded, 14 newly installed, 0 to remove and 0 not upgraded.
Need to get 73.9 MB of archives. After unpacking 191 MB will be used.
The following packages have unmet dependencies:
 virtualbox-5.0 : Depends: libdevmapper1.02.1 (>= 2:1.02.90) but 2:1.02.77-6ubuntu2 is installed.
                  Depends: libstdc++6 (>= 4.9) but 4.8.4-2ubuntu1~14.04.1 is installed.
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/?] n

*** No more solutions available ***

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/?] 
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

Neste ponto, não sei o que fazer a seguir. Como posso instalar o VirtualBox na minha máquina?

Conforme solicitado, a saída de apt-cache policy virtualbox é

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://us.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://us.archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages
    
por g.rocket 15.03.2016 / 18:59

2 respostas

3

Edite o arquivo /etc/apt/sources.list e adicione uma das seguintes linhas:

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

Salvar e sair

atualize sudo apt-get update

Instale dkms

 sudo apt-get install dkms

Configurar chave pública do oracle:

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

Instale o Oracle VirtualBox

 sudo apt-get update
 sudo apt-get install virtualbox-5.0
    
por 15.03.2016 / 19:17
1

Eu consegui instalá-lo baixando o .deb do site deles e, em seguida, executando

sudo dpkg -i the/path/to/virtualbox-5.0_5.0.16-105871-Ubuntu-trusty_amd64.deb

que deu um erro devido a falta de dependências, então

sudo apt-get install -f

para realmente instalá-lo.

Dito isto, a resposta do GAD3R é melhor e mais completa, e eu ainda estou preocupado de ter quebrado algo assim.

    
por 15.03.2016 / 19:20