3

when I try to install g++ by "sudo apt-get install g++" command line gives me the msg "Unable to install....You have broken packages." How can I fix it??? And what does that "broken package" mean??? plz help....

3 Answers3

2

This is a common problem.
To fix it in the major part of the cases, from your Terminal (or xTerm, or VT) execute in order:

  1. sudo apt-get clean
  2. sudo apt-get update
  3. sudo apt-get -f install
  4. sudo dpkg --configure -a

You will need a stable internet connection and the repositories enabled.

Please, feel free to comment under here if you have other inherent questions,
have a nice day.

1

It's means you have not installed all dependencies of a package. You can install them by sudo apt-get install -f

0

Try: sudo apt-get install -f -y

That should typically fix any missing dependencies (the usual cause for a broken package).