When I try to install g++ in my machine I am getting the following message.
support:/$ sudo apt-get install g++ Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: g++ : Depends: gcc (>= 4:4.8.1-2ubuntu3) but it is not going to be installed Depends: g++-4.8 (>= 4.8.1-4~) but it is not going to be installed Depends: gcc-4.8 (>= 4.8.1-4~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
I am using Ubuntu 13.10(Saucy). I have stuck up with this problem for 2 days now. I know this is a duplicate question but still I am posting it because I couldn't find an solution from other similar posts.
I have tried all solutions given in Package system is broken. How to fix it? . But it couldn't solve the issue.
As asked in a comment in https://askubuntu.com/questions/385008/cant-install-g-on-13-10-dependency-problem , Im putting the result of
apt-cache policy g++ g++-4.8 below
g++: Installed: (none) Candidate: 4:4.8.1-2ubuntu3 Version table: 4:4.8.1-2ubuntu3 0 500 http://de.archive.ubuntu.com/ubuntu/ saucy/main i386 Packages g++-4.8: Installed: (none) Candidate: 4.8.2-1ubuntu1 Version table: 4.8.2-1ubuntu1 0 500 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/ saucy/main i386 Packages 4.8.1-10ubuntu8 0 500 http://de.archive.ubuntu.com/ubuntu/ saucy/main i386 Packages
PS: I am not looking for any particular version of g++. Actual working scenario is I want to install npm package 'libxmljs' which is dependent on 'node-gyp'. For 'node-gyp' to install properly the system should have 'make', 'g++' and 'python'. I have make and python in my system. The following is what I get when I run
The program 'g++' can be found in the following packages: * g++ * pentium-builder Try: sudo apt-get install <selected package>
Please help me to solve the issue.