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) ?
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,
gccdefaults to version 4.5, and if I want to use version 4.4 I have to typegcc-4.4.As far as I know there is no official package for gcc 4.6 for Ubuntu yet.