16

I have a problem with installation of apps from the terminal. These are examples of this problem:

ratanak@ratanak-walker:~$ sudo apt-get install httrack
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 httrack : Depends: libhttrack2 (>= 3.48.24) but it is not going to be installed
 rstudio : Depends: libjpeg62 but it is not going to be installed
           Depends: libgstreamer0.10-0 but it is not installable
           Depends: libgstreamer-plugins-base0.10-0 but it is not installable
           Recommends: r-base (>= 2.11.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

ratanak@ratanak-walker:~$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 r-base : Depends: r-base-core (>= 3.4.0-1xenial0) but it is not going to be installed
          Depends: r-recommended (= 3.4.0-1xenial0) but it is not going to be installed
          Recommends: r-base-html but it is not going to be installed
          Recommends: r-doc-html but it is not going to be installed
 rstudio : Depends: libjpeg62 but it is not going to be installed
           Depends: libgstreamer0.10-0 but it is not installable
           Depends: libgstreamer-plugins-base0.10-0 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I notice that these problem started when I started installing program r.

3
  • 4
    Have you tried: sudo apt --fix-broken install first? May 12, 2017 at 10:25
  • what version of Ubuntu are you running ? Also make sure you system is fully updated before trying to install new packages. (1) sudo apt-get update (2) sudo apt-get upgrade
    – MeganFoxz
    May 12, 2017 at 10:26
  • I'm running 17.04. May 12, 2017 at 10:27

3 Answers 3

27

This problem is solved.

sudo apt install --fix-broken
sudo apt-get update
sudo apt-get upgrade

Thank you! Cheers!

6
  • 2
    This worked for me, thank you...but why? What does --fix-broken install actually do?
    – Dowlers
    Oct 20, 2017 at 5:20
  • It works also for Ubuntu 16.04 LTS Jan 22, 2018 at 9:43
  • In my case, it was enough to use the first command sudo apt --fix-broken install Feb 9, 2018 at 14:29
  • Hi, Dowlers. I think when we have problem "unmet dependencies" we use: $ sudo apt --fix-broken install Mar 19, 2018 at 2:29
  • @Dowlers See askubuntu.com/questions/263378/… for an explanation.
    – Melebius
    Apr 23, 2018 at 11:23
5

run

sudo dpkg --configure -a
sudo apt update && sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove
sudo apt dist-upgrade -y

tell me if that helps, cheers!

1

Try using sudo apt full-upgrade -- that will remove some packages if necessary.

You must log in to answer this question.

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