0
votes

I am still a learner in installing packages in ubuntu. Actually, I had copied an iso image file of ubuntu from a torrent more than a year ago and I run with using Oracle Virtual Box on my Windows machine (primarily to compile in g++).

At that time I had installed gcc 4.4.1. Now I am updating it to 4.6 (gcc-4.6-20110610.tar.bz2). I don't know where my 4.4.1 package is stored, but the 4.6 package I am storing in a local folder. My questions are:

(1) Will my 4.4 package get affected with this new installation ?

(2) Is there a way that I can toggle between both compilations whenever I want (say gcc-4.4 or gcc-4.6) ?

2
This question belongs on askubuntu.comJesper

2 Answers

2
votes

If you install gcc 4.6 in a directory in your home folder (I guess that's what you mean by "local folder") then it will not affect your standard gcc 4.4 installation.

I have Ubuntu 11.04 and I have both gcc 4.5 (the standard version for Ubuntu 11.04) and gcc 4.4 installed. (I need 4.4 because NVIDIA's CUDA toolkit requires gcc 4.4). I installed them both via the package management system, not in a folder in my home directory. With this setup, gcc defaults to version 4.5, and if I want to use version 4.4 I have to type gcc-4.4.

As far as I know there is no official package for gcc 4.6 for Ubuntu yet.

1
votes

the package4.4 won't be affected,and you could have both the two versions of gcc. But there is only one valid version's link toward the command 'g++' in default .