How to fix dependencies / broken packages

  • When I try to install system updates, skype or phpmyadmin I got this error:

    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     libc6 : Depends: libgcc1 but it is not going to be installed
             Depends: tzdata but it is not going to be installed
     libc6-dev : Depends: libc-dev-bin (= 2.15-0ubuntu10.3)
                 Depends: linux-libc-dev but it is not going to be installed
                 Recommends: gcc but it is not going to be installed or
                             c-compiler
     skype:i386 : Depends: libasound2:i386 (>= 1.0.16) but it is not going to be installed
                  Depends: libc6:i386 (>= 2.3.6-6~) but it is not going to be installed
                  Depends: libc6:i386 (>= 2.7) but it is not going to be installed
                  Depends: libgcc1:i386 (>= 1:4.1.1) but it is not going to be installed
                  Depends: libqt4-dbus:i386 (>= 4:4.5.3) but it is not going to be installed
                  Depends: libqt4-network:i386 (>= 4:4.8.0) but it is not going to be installed
                  Depends: libqt4-xml:i386 (>= 4:4.5.3) but it is not going to be installed
                  Depends: libqtcore4:i386 (>= 4:4.7.0~beta1) but it is not going to be installed
                  Depends: libqtgui4:i386 (>= 4:4.8.0) but it is not going to be installed
                  Depends: libqtwebkit4:i386 (>= 2.1.0~2011week13) but it is not going to be installed
                  Depends: libstdc++6:i386 (>= 4.6) but it is not going to be installed
                  Depends: libx11-6:i386 but it is not going to be installed
                  Depends: libxext6:i386 but it is not going to be installed
                  Depends: libxss1:i386 but it is not going to be installed
                  Depends: libxv1:i386 but it is not going to be installed
                  Depends: libssl1.0.0:i386 but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    

    How to solve this?

  • -f or --fix-broken
    

    Explanation from the man apt-get pages

    Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system. It is possible that a system's dependency structure can be so corrupt as to require manual intervention (which usually means using dselect(1) or dpkg --remove to eliminate some of the offending packages). Use of this option together with -m may produce an error in some situations. Configuration Item: APT::Get::Fix-Broken.

    I recommend trying the following commands.

    sudo dpkg --configure -a
    
    sudo apt-get install -f
    

    Answer yes to any prompts and let apt-get try to resolve the issue for you.

    EDIT:

    Based on comment try the following command it should clean up your system.

    sudo sh -c "apt-get update;apt-get dist-upgrade;apt-get autoremove;apt-get autoclean"
    

    pre-dependency problem - not installing libgcc1:i386 Errors were encountered while processing: /var/cache/apt/archives/libgcc1_1%3a4.6.3-1ubuntu5_amd64.deb /var/cache/apt/archives/libgcc1_1%3a4.6.3-1ubuntu5_i386.deb E: Internal Error, No file name for libc6 W: Could not perform immediate configuration on 'multiarch-support:amd64'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2) E: Sub-process /usr/bin/dpkg returned an error code (1) I tried lots of time every command, i think from above code you can help m

    The following packages have unmet dependencies: libc6 : Depends: libgcc1 but it is not going to be installed Depends: tzdata but it is not going to be installed

    What version of Ubuntu are you using? Did you try to install these packages (Skype) from the terminal or the Software Manager?

    12.04 lts, yes i tried but failed

    Which one did you try?

    i tried skype installation

    But from the terminal or from the Ubuntu Software Center ?

    from terminal i tried

    Try running my edited command above to clean up your system and then use the link below to get the .deb skype package for 12.04 and just double click it. When ever possible if it isn't in the Software Manager get the .deb package and it will make your life a lot easier.http://www.skype.com/en/download-skype/skype-for-linux/downloading/?type=ubuntu64

    will i have to download it and double click on it right?

    PhpMyAdmin is a whole other story as you will need enough knowledege to get a LAMP server up and running Linux, Apache, MySQL and PHP I recommend using XAMPP. Here is the link to setting it up in Linux it come with PhpMyAdmin. http://www.apachefriends.org/en/xampp-linux.html

    When i click on install button it gives me an error Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f

    Yeap all you need to do with .deb packages is download them (Normally for your version or at least 32 or 64 bit) then double click them that will open them in the Ubuntu Software Center

    Have you added any repositories to your system? and what exact command did you try at the beginning?

    from where i can check repositories, i don't know, please help

    Nirmal if you are new to Ubuntu why did you try to install packages from the terminal? I think you have some reading to do! Did you try running the command at the end of my answer above?

    yes i executed this command sudo sh -c "apt-get update;apt-get dist-upgrade;apt-get autoremove;apt-get autoclean"

    now please tell me how to clean every thing and reinstall using download and double click, please help

    You don't have enough rep to chat so to avoid pages of comments I recommend a fresh install and leave the terminal until you have some experience. To install applications use the Software Manager or downloaded .deb packages Goodluck.

    +1 for the edit which resolved a bucket of problems I was having with 16.04 since a recent update gone wrong.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM