I am running Ubuntu 12.04LTS from virtualbox. While installing a package, configure gave an error saying
configure: error: C++ compiler cannot create executables
So I tried installing g++ by sudo apt-get install g++ but the installation failed with this statement: E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
When I try to install build-essentials it returns an error:
The following packages have unmet dependencies:
build-essential : Depends: g++ (>= 4:4.4.3) but it is not installable
E: Unable to correct problems, you have held broken packages.
Done with all troubleshooting steps that i can find to solve this irritating error:
Unable to correct problems, you have held broken packages
i had done, as root, the following:
dpkg --configure -a
apt-get install -f
apt-get install --fix-broken
apt-get clean && apt-get update
Still same error when i try to install g++
I am not able to install aptitude either. [somebody suggested that using aptitude might solve the problem]