-1

I am using Ubuntu 13.10(Saucy). I installed g++-4.7 in my machine. But when I tried to run g++ or tried to check the version it is showing that the package is not installed.

$ g++ --version
The program 'g++' can be found in the following packages:
 * g++
 * pentium-builder
Try: sudo apt-get install <selected package>

sudo apt-get install g++ or sudo apt-get install g++-4.8 is not successful in my machine because of some broken packages which I couldn't resolve.

Please help me to use g++ with 4.7 version. Thanks in advance.

shaunthomas999
  • 181
  • 1
  • 1
  • 9
  • Could you instead edit your other question. http://askubuntu.com/q/391070/169736 Also, you don't have g++ installed. – Braiam Dec 15 '13 at 13:38
  • You probably don't have it installed, otherwise you would get something like this. But try gcc --version anyway. It may be available from here as well. – Wilf Dec 15 '13 at 14:22
  • @Braiam - What modification do you want in the question askubuntu.com/q/391070/169736 ? I asked you about that there and you didn't reply. Please see that this is completely different question. This is about having got g++-4.7 installed and asking whether there is any provision to run it using g++ command. – shaunthomas999 Dec 15 '13 at 15:40
  • If that's what appears when you type g++ in a terminal obviously you don't have the binary installed. And there's a edit button in each post. What you left me in comments should be in your question, not in a comment. – Braiam Dec 15 '13 at 15:43
  • try sudo apt-get update.maybe this helps and then try installing. maybe that helps – akki Dec 17 '13 at 19:27

1 Answers1

0

The following command will help to use g++-4.7 as g++.

sudo ln -s /usr/bin/g++-4.7 /usr/bin/g++ 

This is what I was asking for. In synaptic you can see that g++ is having version 4.8.1. By using the above command you will be able to use g++-4.7 with g++ command in your machine.

shaunthomas999
  • 181
  • 1
  • 1
  • 9