Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have done the following. I just don't know what to try next. I supposedly have the newest version of gcc by following these directions

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7 g++-4.7
Also, don't forget to update-alternatives, as suggested here

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7 
sudo update-alternatives --config gcc

here is what I have done to update g++ and make the file.

ubuntu@ubuntu-VirtualBox:~/Desktop$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++ is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 290 not upgraded.
makeubuntu@ubuntu-VirtualBox:~/Desktop$

ubuntu@ubuntu-VirtualBox:~/Desktop$ make
g++ -Wall -Wno-switch -I. -g   -c -o pass.o pass.cpp
make: g++: Command not found
make: *** [pass.o] Error 127

Someone has told me to enter the following commands but I don't know what it means. I also don't know what 290 not installed means either.

ubuntu@ubuntu-VirtualBox:~/Desktop$ dpkg -S g++
g++-4.4: /usr/share/man/man1/i686-linux-gnu-g++-4.4.1.gz
g++-4.4: /usr/share/doc/gcc-4.4-base/test-summaries/g++.sum.gz
g++-4.6: /usr/share/man/man1/g++-4.6.1.gz
g++: /usr/bin/g++
g++-4.6: /usr/share/man/man1/i686-linux-gnu-g++-4.6.1.gz
g++-4.4: /usr/share/doc/g++-4.4
g++-4.6: /usr/share/doc/g++-4.6
g++: /usr/share/doc/g++
g++: /usr/share/man/man1/i686-linux-gnu-g++.1.gz
g++-4.4: /usr/share/man/man1/g++-4.4.1.gz
g++-4.4: /usr/bin/g++-4.4
g++-4.6: /usr/bin/g++-4.6
g++-4.6: /usr/share/doc/gcc-4.6-base/test-summaries/g++.sum.gz
g++: /usr/share/man/man1/g++.1.gz
g++: /usr/bin/i686-linux-gnu-g++
g++-4.4: /usr/bin/i686-linux-gnu-g++-4.4
g++-4.6: /usr/bin/i686-linux-gnu-g++-4.6


ubuntu@ubuntu-VirtualBox:~/Desktop$ ls /usr/bin/g++
/usr/bin/g++-4.4  /usr/bin/g++-4.6
share|improve this question
    
Have you tried apt-get install --reinstall g++? –  dobey Apr 16 at 19:49
    
Did you not notice "290 not upgraded"? Also, what is the result of which g++? –  Elliott Frisch Apr 16 at 19:50
    
Also, creating duplicate questions doesn't help. –  saiarcot895 Apr 16 at 20:13
    
I don't know what 290 not upgraded means –  user21839 Apr 16 at 20:35
    
You have 290 packages that can/should be upgraded. Run sudo apt-get upgrade to get a list of upgradable packages and to update your system. –  saiarcot895 Apr 16 at 20:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.