LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   need an older gcc version (http://www.linuxquestions.org/questions/debian-26/need-an-older-gcc-version-690246/)

parent's_basement 12-12-2008 11:13 PM

need an older gcc version
 
Hello,

VMware is requesting an older version of gcc:

Your kernel was built with "gcc" version "4.1.3", while you are trying to use
"/usr/bin/gcc" version "4.3.2". This configuration is not recommended and
VMware Server may crash if you'll continue. Please try to use exactly same
compiler as one used for building your kernel.

I've uninstalled gcc 4.3.2 but how do I locate and install gcc 4.1.3? I've gone to http://gcc.gnu.org/releases.html but don't see the version I need.

Thanks,

pb

jens 12-13-2008 12:54 AM

4.1 should be in your repo.

#apt-get install gcc-4.1
#export CC=/usr/bin/gcc-4.1

BorderAmigos 12-17-2008 08:10 PM

You may have the version you need already. In my case in /usr/bin I have gcc-3.3, gcc-3.4, gcc-4.1, gcc-4.2 and gcc-4.3. The trick for me is the symbolic link simply named gcc. When I get the error you mention I change the link to point to the appropriate version. You appear to have it linked to gcc-4.3 but you want it to gcc-4.2. Try the following...

ln -s -f /usr/bin/gcc-4.1 /usr/bin/gcc

The -f forces the link overwriting the existing one, your directories may be different.

farslayer 12-18-2008 07:04 AM

I use the export command as jens suggests. it's only a temporary change of a variable in the local environment.

Code:

it-etch:~# export CC=gcc-4.1
it-etch:~# echo $CC
gcc-4.1
it-etch:~# exit
logout
user@it-etch:~$ su -
Password:
it-etch:~# echo $CC

it-etch:~#

just exiting that shell clears the change so you aren't doing anything that is semi-permanent.

farslayer 12-18-2008 07:04 AM

I use the export command as jens suggests. it's only a temporary change of a variable in the local environment.

Code:

it-etch:~# export CC=gcc-4.1
it-etch:~# echo $CC
gcc-4.1
it-etch:~# exit
logout
user@it-etch:~$ su -
Password:
it-etch:~# echo $CC

it-etch:~#

just exiting that shell clears the change so you aren't doing anything that is semi-permanent.


All times are GMT -5. The time now is 11:49 PM.