Ubuntu 18.04.1 can not install VirtualBox-6.0

12,407

Adding some repositories and installing the missing dependencies worked for me:

sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian bionic contrib"
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libpng16-16 libqt5core5a libqt5printsupport5 libqt5widgets5 libqt5x11extras5
sudo apt-get install virtualbox-6.0

Based on this answer: Virtual Box 5.1.22 Installation Failure

Share:
12,407
anlex N
Author by

anlex N

Updated on September 18, 2022

Comments

  • anlex N
    anlex N over 1 year

    I follow virtualbox official tutorial Debian-based Linux distributions but something is wrong

    osboxes@osboxes:~$ sudo apt-get install virtualbox-6.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-6.0 : Depends: libqt5x11extras5 (>= 5.6.0) but it is not installable
                      Recommends: libsdl-ttf2.0-0 but it is not installable
                      Recommends: pdf-viewer
    E: Unable to correct problems, you have held broken packages.
    
    • user535733
      user535733 over 5 years
      Please edit your question to clearly explain which source you added. ("Add the following line to your /etc/apt/sources.list"). Also please include the complete output of sudo apt update
    • Patient32Bit
      Patient32Bit over 5 years
      You could install aptitude: sudo apt install aptitude -y and use sudo aptitude install virtualbox-6.0. It might provide you with different solutions for your unmet dependencies. If one doesn't work out purge again and try the next solution n. Hope that helps somehow.
    • anlex N
      anlex N over 5 years
      i still don't install
    • Greg Kramida
      Greg Kramida over 4 years
      This question is in fact not a duplicate, but a completely separate and useful question. None of the duplicate post candidates ask this specific question nor do the answers provide a solution to this problem. This question should be restored.
    • Maxima
      Maxima over 4 years
      @Patient32Bit Thanks a ton! I spent a whole day figuring out how to install since there were many errors showing up. This worked like a charm!