19

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?

Zanna
  • 70,465
Nirmal T.
  • 191

1 Answers1

25
-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"
CoalaWeb
  • 3,195
  • 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 – Nirmal T. Mar 03 '13 at 09:51
  • 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 – Nirmal T. Mar 03 '13 at 09:54
  • What version of Ubuntu are you using? Did you try to install these packages (Skype) from the terminal or the Software Manager? – CoalaWeb Mar 03 '13 at 09:55
  • 12.04 lts, yes i tried but failed – Nirmal T. Mar 03 '13 at 09:57
  • Which one did you try? – CoalaWeb Mar 03 '13 at 09:59
  • i tried skype installation – Nirmal T. Mar 03 '13 at 10:00
  • But from the terminal or from the Ubuntu Software Center ? – CoalaWeb Mar 03 '13 at 10:03
  • from terminal i tried – Nirmal T. Mar 03 '13 at 10:07
  • 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 – CoalaWeb Mar 03 '13 at 10:11
  • will i have to download it and double click on it right? – Nirmal T. Mar 03 '13 at 10:14
  • 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 – CoalaWeb Mar 03 '13 at 10:14
  • 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 – Nirmal T. Mar 03 '13 at 10:16
  • 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 – CoalaWeb Mar 03 '13 at 10:17
  • Have you added any repositories to your system? and what exact command did you try at the beginning? – CoalaWeb Mar 03 '13 at 10:18
  • from where i can check repositories, i don't know, please help – Nirmal T. Mar 03 '13 at 10:18
  • 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? – CoalaWeb Mar 03 '13 at 10:24
  • yes i executed this command sudo sh -c "apt-get update;apt-get dist-upgrade;apt-get autoremove;apt-get autoclean" – Nirmal T. Mar 03 '13 at 10:25
  • now please tell me how to clean every thing and reinstall using download and double click, please help – Nirmal T. Mar 03 '13 at 10:26
  • 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. – CoalaWeb Mar 03 '13 at 10:29
  • +1 for the edit which resolved a bucket of problems I was having with 16.04 since a recent update gone wrong. – Elder Geek Oct 28 '16 at 17:31
  • [ sudo sh -c "apt-get update;apt-get dist-upgrade;apt-get autoremove;apt-get autoclean" ] is a really strange syntax for doing simply: sudo apt update -y && apt upgrade -y && apt autoclean -y && apt autoremove -y and why on earth would you introduce a dist-upgrade in this mix? That's really dangerous. – Julius Dec 04 '23 at 21:49