3

tl;dr: Every apt-get command fails because of this:

Depends: libgl1-mesa-dri (= 10.5~git1411191810.9460cd~gd~u) but 10.4~git1411171930.920f87~gd~u is to be installed

I cannot remove or install anything. What should I do?


Long story:

I'm using Ubuntu 14.10 and yesterday I tried following this manual: https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/docs/Installation.md

And ended up messing something. I have a stop sign next to the clock on the taskbar which says "Please run package manager" and "packages have unmet dependencies"

sudo apt-get upgrade stopped working (update seems to be working however).

I tried to remove the packages but sudo apt-get remove stopped working, This is the error I get:

Reading package lists... Done Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies: 
  libegl1-mesa : Depends: libgl1-mesa-dri (=10.5~git1411191810.9460cd~gd~u) but 10.4~git1411171930.920f87~gd~u is to be installed
  libgbm1 : Depends: libgl1-mesa-dri (= 10.5~git1411191810.9460cd~gd~u) but 10.4~git1411171930.920f87~gd~u is to be installed
  libgl1-mesa-glx : Depends: libgl1-mesa-dri (= 10.5~git1411191810.9460cd~gd~u) but 10.4~git1411171930.920f87~gd~u is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Running sudo apt-get insall -f gives this:

  libegl1-mesa : Depends: libgl1-mesa-dri (= 10.5~git1411191810.9460cd~gd~u) but 10.4~git1411171930.920f87~gd~u is installed
  libgbm1 : Depends: libgl1-mesa-dri (= 10.5~git1411191810.9460cd~gd~u) but 10.4~git1411171930.920f87~gd~u is installed
  libgl1-mesa-glx : Depends: libgl1-mesa-dri (= 10.5~git1411191810.9460cd~gd~u) but 10.4~git1411171930.920f87~gd~u is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

using dpkg also doesn't work:

$ sudo dpkg -r libegl1-mesa
dpkg: dependency problems prevent removal of libegl1-mesa:amd64:
  libwayland-egl1-mesa:amd64 depends on libegl1-mesa (= 10.5~git1411191810.9460cd~gd~u). 
  libgstreamer-plugins-bad1.0-0:amd64 depends on libegl1-mesa (>= 7.8.1) | libegl1-x11; however:
    Package libegl1-mesa:amd64 is to be removed.
    Package libegl1-x11 is not installed.
    Package libegl1-mesa:amd64 which provides libegl1-x11 is to be removed.
  libcogl20:amd64 depends on libegl1-mesa (>= 7.8.1) | libegl1-x11; however:
    Package libegl1-mesa:amd64 is to be removed.
    Package libegl1-x11 is not installed.
    Package libegl1-mesa:amd64 which provides libegl1-x11 is to be removed.
  libegl1-mesa-drivers:amd64 depends on libegl1-mesa (=> 10.5~git1411191810.9460cd~gd~u).
  libqt5gui5:amd64 depends on libegl1-mesa (>= 7.8.1) | libegl1-x11; however:
    Package libegl1-mesa:amd64 is to be removed.
    Package libegl1-x11 is not installed.
    Package libegl1-mesa:amd64 which provides libegl1-x11 is to be removed.
  xserver-xorg-core depends on libegl1-mesa | libegl1; ho
dpkg: error processing package libegl1-mesa:amd64 (--remove): dependency problems - not removing Errors were encountered while processing:
  libegl1-mesa:amd64

Update:

Somehow I solved it, I'm not exactly sure how, so I'll describe everything I did:

Typed software-properties-gtk in terminal and checked all checkboxes on ubuntu software tab, then went to other software, unchecked and removed all checkboxes that said "disabled on utopic", checked all that made sense to me (chrome dropbox etc'), then did sudo apt-get install -f and everything seemed to work again.

However - after reoboting, I see a black screen with a flashing cursor. Maybe a graphics driver problem?

Uri
  • 883

5 Answers5

2

Running sudo apt-get install --reinstall ubuntu-desktop fixed everything.

Adam Monsen
  • 2,161
Uri
  • 883
1

I had a similar issue. multiple areas of the libegl1-mesa package were missing. This prevented apt-get update from working, and I couldn't install new packages... was a nightmare. I tried everything above, as well as launching in recovery mode and running the dpkg option to fix broken packages. Nothing worked.

I finally corrected the issue with a slight variation of the above commands in terminal:

sudo apt-get -f install --fix-missing

Followed by:

sudo apt-get update

All that research, for such a painfully simple resolution. God I love Ubuntu. Hope this Helps.

0

I am going to provide my solution because none of the others worked.

1. I had to check and remove the sources that was pointing at the conflict. In my case sudo rm /etc/apt/sources.list.d/tuxedo-computers.list fixed the issue. sudo apt update obviously to apply the changes. There are other ways for that, as mentioned here: How can PPAs be removed?

2. Show the versions that can be installed etc.

sudo apt-cache policy libgbm1
  Installed: 22.3.7-0+tux1
  Candidate: 22.3.7-0+tux1
  Version table:
 *** 22.3.7-0+tux1 100
        100 /var/lib/dpkg/status
     22.2.5-0ubuntu0.1 500
        500 http://ch.archive.ubuntu.com/ubuntu kinetic-updates/main amd64 Packages
     22.2.1-1ubuntu1 500
        500 http://ch.archive.ubuntu.com/ubuntu kinetic/main amd64 Packages

as you can see, it's still installed but not in the sources list anymore.

  1. Then forcing it to install the newest current version.

    sudo apt-get -f reinstall libgbm1=22.2.5-0ubuntu0.1

And , everything works again. :-)

Joe Eifert
  • 105
  • 4
0

As the error shows, try executing apt-get -f install to fix unmet dependencies.

segarci
  • 109
0

Basically, you removed too much. Stop removing and start adding back in again or you'll end up with a non-working OS! :-(

Currently Unity doesn't even want to open because it is missing important files, hence the black cursor...

When you see the black cursor, press [ctrl][alt][f1] and login as the admin user. There you will have a terminal (no GUI, that's broken already).

Try:

sudo apt-get install aptitude

That is a character-based intelligent package manager which allows you to take more informed decisions. If even that fails, you'd better restore your latest system backup or if you don't have one, re-install Ubuntu if you have a separate "home" partition. If you just have one huge drive and no separate "home", reinstall without formatting the drive or you'll loose everything!

To start using aptitude just do a:

sudo aptitude
Fabby
  • 35,017