LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install old Gcc version ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-old-gcc-version-190686/)

vasilakis 06-07-2004 10:19 AM

How to install old Gcc version ?
 
I am using Fedora Linux with gcc version3.3.2 but I need to install some older version, I think 2.96 will work.
How to do that ?
It will be very helpful for me.

marghorp 06-07-2004 11:54 AM

First of all you have to get it :) I suppose you already have it in RPM or tar.gz format. The thing you have to do first is uninstall the new gcc version and then install the old gcc.

Uninstalling is done with:

rpm -e gcc

I think this should do it or produce some errors. If it produces an error that the package couldn't be found, try appending the gcc version.

Or check the fedora CDs for the gcc RPM and use the name up to .i386.RPM

Once you have it uninstalled, you have to install the old one.

You do that by rpm -i gcc.xxx.rpm
or from the source files:
tar -zxvf gcc.xxx.tar.gz
or
tar -vjxf gcc.xxx.tar.bz2
cd gcc.xxx
./configure
make
make install

This should install the old gcc :)

Good luck! Peace!

vasilakis 06-09-2004 11:01 AM

Thank you very much.

But I still have problems.
I uninstalles my current gcc version.
Untar old gcc
but affter ./configure
I got this message

[vasilis@vasilak gcc-2.95.2]$ ./configure
Configuring for a i686-pc-linux-gnuoldld host.
Created "Makefile" in /home/vasilis/gcc-2.95.2
./configure: line 7: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

btmiller 06-09-2004 11:57 AM

Well this is going to sound strange, but you need a C compiler to compile gcc. It's OK to have two versions of gcc on your system. You should reinstall gcc 3.3.2 and use it to compile the older gcc. You can put the older gcc in a different path (say /usr/local/bin instead of /usr/bin) to differentiate them (you'll want to rename the more recent gcc gcc3 and the older one gcc2 and then symlink gcc itself to whichever you want to use).

Of course, the simplest thing to do would be to install gcc 2.96 from RPM or some other binary format.

vasilakis 06-10-2004 11:25 AM

Got the folowing message during gcc installation

[vasilis@vasilak vasilis]$ rpm -i gcc-2.96-81.i386.rpm
warning: gcc-2.96-81.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
cpp = 2.96-81 is needed by gcc-2.96-81


I suppose I have to install cpp 2.96-81 in my PC
Does anybody know how to install it?

I Tryed this

[vasilis@vasilak vasilis]$ rpm -i cpp-2.96-81.i386.rpm
warning: cpp-2.96-81.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: cannot get exclusive lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm

..but it didn't work

vasilakis 06-10-2004 11:58 AM

Does it matter wich directory I use for installation and if I am installing from a user or root account ?


All times are GMT -5. The time now is 03:11 AM.