Ubuntu – The following packages have unmet dependencies: can’t install any software. Ubuntu 16:04

aptdependenciesdpkgpackage-management

I have unmet dependencies when trying to install gitlab, VLC, GParted and other packages.

openssh-server :   
 Depends: openssh-client (= 1:7.2p2-4)  
 Depends: openssh-sftp-server but it is not going to be installed  
 Recommends: ssh-import-id but it is not going to be installed

for VLC:

vlc :  
  Depends: libgles1-mesa (>= 7.8.1) but it is not going to be installed  
  or libgles1 Depends: libgles2-mesa (>= 7.8.1) but it is not going to be installed  
  or libgles2

I have tried:

sudo apt-get install -f
sudo apt-get install aptitude
sudo dpkg --configure -a
sudo apt-get autoclean
sudo apt-get autoremove

I've even tried:

sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -f && sudo apt-get install openssh-server -y

I have tried basically everything, but nothing is working. I can't even install gitlab or any other application.

Best Answer

I have been looking at some of the packages that you are having issues with for it to install. When I did an apt search it was showing xenial-updates for the application:

~$ apt search libgles1-mesa
Sorting... Done
Full Text Search... Done
libglapi-mesa/xenial-updates,now 17.2.8-0ubuntu0~16.04.1 amd64 [installed]
  free implementation of the GL API -- shared library

It sounds to me that you might not have the correct repositories enabled.

Go to Settings -> Software & Updates.

Check the Ubuntu Software tab and make sure that they all are enabled:

enter image description here

Then go to the Updates tab and make sure that they are enabled too:

enter image description here

Then click Close at the bottom and I believe that it will want to update the repositories and check for updates. Then try your installations again.

Hope this helps!

Related Question