11

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.

  • 4
    Have you tried: sudo apt --fix-broken install first? – George Udosen May 12 '17 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 '17 at 10:26
  • I'm running 17.04. – Ratanak Ratanak May 12 '17 at 10:27
25

This problem is solved.

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

Thank you! Cheers!

  • 2
    This worked for me, thank you...but why? What does --fix-broken install actually do? – Dowlers Oct 20 '17 at 5:20
  • 1
    It worked for me also... Thank you. – vissu pepala Nov 24 '17 at 14:56
  • It works also for Ubuntu 16.04 LTS – simhumileco Jan 22 '18 at 9:43
  • In my case, it was enough to use the first command sudo apt --fix-broken install – simhumileco Feb 9 '18 at 14:29
  • Hi, Dowlers. I think when we have problem "unmet dependencies" we use: $ sudo apt --fix-broken install – Ratanak Ratanak Mar 19 '18 at 2:29
2

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!

0

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.