DIGIT-ARC read-only archive · snapshot: July 23, 2026

Need help with Linux

4 posts · originally from https://geek.digit.in/community/threads/need-help-with-linux.177117/

harshilsharma63
harshilsharma63 Original post #1
Aug 23, 2013 at 6:43 PM
Hi. I need assistance regarding g++ installation in Ubuntu 12.04. this is what happened:

> I installed gcc and g++ version 4.4 using 'apt-get'.

> I also installed gcc and g++ version 4.6. After this, 4.6 became the default, but the tool I'm usng doesn't support v4.6 of both compilers; only v4.4 is supported.

> After some googling, I ran 'apt-get remove gcc g++' to completely remove gcc and g++.

> I managed to get gcc v4.4 back.

> When I run "sudo apt-get install g++-4.4", I get this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
g++-4.4 is already the newest version.
The following packages were automatically installed and are no longer required:
zerofree fakeroot libdumbnet1 open-vm-tools patch
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 595 not upgraded.

> And on running" g++ --version", I get this:

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

Please tell how to install g++ v4.4.

Update:

I installeg g++ v4.4 from Ububntu Software Center, but now everything instead of 'g++', I have to use 'g++-4.4'. How do I use 4.4 as the default version and skip with '-4.4'.
Flake
Flake #2
Aug 23, 2013 at 10:22 PM
Have you tried to set alias?
Add following code at the end of ~/.bashrc file or in ~/.bash_aliases.
Code:
alias g++="g++-4.4"

Execute source filename command after editing file.
harshilsharma63
Aug 23, 2013 at 10:39 PM
Thanks, I'll try that tomorrow.

Thanks, I'll try that tomorrow.