0

sudo apt-get install swi-prolog

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:
 libgbm1-lts-vivid : Depends: libgl1-mesa-dri-lts-vivid (= 10.5.2-0ubuntu1~trusty1) but 10.5.9-2ubuntu1~trusty2 is to be installed
 swi-prolog : Depends: swi-prolog-nox (= 6.6.4-2ubuntu1) but it is not going to be installed
              Depends: swi-prolog-x (= 6.6.4-2ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
anuj@anuj-MacBookPro:~/Desktop$ 

    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Apt-get is not working for me. I am using Mactel , Ubuntu 14.04 LTS. I recently switched from x.org graphics driver to nvidia drivers. Been having this issue since then.

libgbm1-lts-vivid : Depends: libgl1-mesa-dri-lts-vivid (= 10.5.2-0ubuntu1~trusty1) but 10.5.9-2ubuntu1~trusty2 is to be installed This is the error message i'm getting.

And sudo apt-get -f install is also not working.

cat /etc/apt/sources.list.d/*.list | grep ppa returns

# deb http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu trusty main
# deb-src http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu trusty main
# deb http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu trusty main
# deb-src http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu trusty main
# deb http://ppa.launchpad.net/jfi/ppa/ubuntu trusty main
# deb-src http://ppa.launchpad.net/jfi/ppa/ubuntu trusty main
# deb http://ppa.launchpad.net/mactel-support/ppa/ubuntu trusty main
# deb-src http://ppa.launchpad.net/mactel-support/ppa/ubuntu trusty main
# deb-src http://ppa.launchpad.net/mactel-support/ppa/ubuntu trusty main
# deb-src http://ppa.launchpad.net/mactel-support/ppa/ubuntu trusty main
# deb http://ppa.launchpad.net/marutter/rdev/ubuntu trusty main
# deb-src http://ppa.launchpad.net/marutter/rdev/ubuntu trusty main
# deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty main
# deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty main
# deb http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu trusty main
# deb-src http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu trusty main
2
  • Can you tell me what method you used to install the Nvidia drivers? Did you install it using the website script/download? If you followed some instructions please share the link to those instructions.
    – Torrien
    Jan 13, 2016 at 4:10
  • I had x.org drivers installed. I used the Additional Drivers to install the Nvidia 340 driver.
    – anz
    Jan 13, 2016 at 4:11

2 Answers 2

0

Perform an Update

Enter command sudo apt-get update and try again.

Else Remove PPAs

If it doesn't work then I bet it is a conflict with a ppa that is requesting an old version of the library. If at some point you added a ppa to install swi-prolog then:

  1. Remove the ppa.
  2. Update repository.
  3. Try to install again.

It is possible a ppa for a different program could be the problem but I doubt it. Since tyring to installed the program is requesting the older version of the library 10.5.2-0ubuntu1~trusty1 compared to 10.5.9-2ubuntu1~trusty2 that "is to be installed", then you probably have a ppa that is installing an old version of the program with old libraries.

Alternatively

Check this very informative answer.

Let me know if nothing works and we can try something else. Sometimes during upgrade some files are not correctly updated and we can take a look.

4
  • Nope, tried that. I have disabled all the ppa for the time being. apt-get -f install leads to The following packages have unmet dependencies: libegl1-mesa-lts-vivid : Depends: libgbm1-lts-vivid (>= 7.11~1) but it is not going to be installed xserver-xorg-core-lts-vivid : Depends: libgbm1-lts-vivid (>= 8.1~0) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    – anz
    Jan 13, 2016 at 4:42
  • I tried updating the broken package through synaptic but same issue there. I can install new packages from synaptic though.
    – anz
    Jan 13, 2016 at 4:43
  • Even if you disabled the ppa you may still have the old library installed. Execute this cat /etc/apt/sources.list.d/*.list | grep ppa and show me the output. Enclose the out put with ` output ` so it looks like this output and add it to your question, might be relevant to your case.
    – Torrien
    Jan 13, 2016 at 4:46
  • Okay. Updated. !
    – anz
    Jan 13, 2016 at 5:00
0

Apparently I tried to delete libgbm1-lts-vivid using dpkg -r --force-depends libgbm1-lts-vivid. It deleted the package. Then I switched back to Synaptic. Now there were 2 broken packages instead of 1. I selected them for removal. Then, it deleted all of the dependencies that included the nvidia drivers, and re-installed x.org graphics drivers.

The apt-get -f install problem seems to be solved but I am back to x.org nouveu drivers instead of nvidia ones. Will look to reinstall nvidia drivers again. Hope it doesnot lead to the same issue.

Thx Torrien.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .