Multiple gcc versions

Lets say you have this package from FC11:

[root@localhost ~]# rpm -q gcc
gcc-4.4.0-4.i586

But you have an source code that needs gcc-4.3 to compile or something lower.

So download lets say this: gcc-4.3.2-7.i386.rpm then:

mkdir newgcc && cd newgcc
download http://pathtogcc/gcc-4.3.2-7.i386.rpm
rpm2cpio gcc-4.3.2-7.i386.rpm | cpio -idv

Now you should have in newgcc/usr/bin/gcc.

Or download the gcc package you need from ftp://ftp.gnu.org and compile it with –prefix=$HOME/newgcc

Tags: , , , , ,

Leave a Reply