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....
Asked
Active
Viewed 1,749 times
3 Answers
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:
sudo apt-get clean
sudo apt-get update
sudo apt-get -f install
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.

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

Purnendu Nath
- 256
0
Try: sudo apt-get install -f -y
That should typically fix any missing dependencies (the usual cause for a broken package).