[HOW TO] solve 'The following packages have unmet dependencies' error?

Try :
sudo apt-get update
sudo apt-get -f install

----------------

if didn't work then give us the contents of /etc/apt/sources.list

  • One possible cause of unmet dependencies could be corrupted package database, and/or some packages weren’t installed properly. To fix this problem, hit Alt+Ctrl+T to open terminal and try to run one of the following commands:
    sudo apt-get clean
    or,
    sudo apt-get autoclean
    apt-get clean clears out the local repository of retrieved package files (the .deb files). It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. apt-get autoclean clears out the local repository of retrieved package files, but unlike apt-get clean, it only removes package files that can no longer be downloaded, and are largely useless.
  • One of the most basic fixes to resolve dependencies problems is to run:
    sudo apt-get -f install
    The -f hare stands for “fix broken”. Apt will attempt to correct broken dependencies. If you manually installed a package that had unmet dependencies, apt-get will install those dependencies, if possible, otherwise it may simply remove the package that you installed in order to resolve the problem.
    Then run:
    sudo dpkg --configure -a
    Then run this again:
    sudo apt-get -f install
    If the output is:
    0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
    That means it failed.
  • Next solution is to run:
    sudo apt-get -u dist-upgrade
    If it shows any held packages, it is best to eliminate them. Packages are held because of dependency conflicts that apt cannot resolve. Try this command to find and repair the conflicts:
    sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
    If it cannot fix the conflicts, it will exit with:
    0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
    Delete the held packages one by one, running dist-upgrade each time, until there are no more held packages. Then reinstall any needed packages. Be sure to use the --dry-run option, so that you are fully informed of consequences:
    sudo apt-get remove --dry-run package-name
    Since removing the package you are trying to install may not be ideal, you might also try finding a repository that has the packages you need to satisfy the dependencies.
Finally, if all else fails, you can attempt to satisfy the dependencies yourself, either by finding and installing the necessary packages, or by installing them from source and then creating “deb” packages for them.
Source: http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies




Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success

0 nhận xét:

Post a Comment