Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-07-2004, 11:19 AM   #1
LQ Newbie
Registered: Jun 2004
Location: Greece
Posts: 11

Rep: Reputation: 0
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.
Old 06-07-2004, 12:54 PM   #2
Senior Member
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
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
or from the source files:
tar -zxvf
tar -vjxf
make install

This should install the old gcc

Good luck! Peace!
Old 06-09-2004, 12:01 PM   #3
LQ Newbie
Registered: Jun 2004
Location: Greece
Posts: 11

Original Poster
Rep: Reputation: 0
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.
Old 06-09-2004, 12:57 PM   #4
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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.
Old 06-10-2004, 12:25 PM   #5
LQ Newbie
Registered: Jun 2004
Location: Greece
Posts: 11

Original Poster
Rep: Reputation: 0
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
Old 06-10-2004, 12:58 PM   #6
LQ Newbie
Registered: Jun 2004
Location: Greece
Posts: 11

Original Poster
Rep: Reputation: 0
Does it matter wich directory I use for installation and if I am installing from a user or root account ?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 03:54 PM
How do I install an old version of gcc thorney Linux - Newbie 1 11-25-2005 01:10 AM
unable to install latest gcc version sapadman Linux - Newbie 1 07-20-2004 06:22 PM
Newer version of glibc means i cant install gcc coop Red Hat 0 09-21-2003 02:40 AM
Install older version of gcc s9902245 Linux - Newbie 1 09-16-2003 04:08 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration