LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-07-2004, 10:19 AM   #1
vasilakis
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, 11:54 AM   #2
marghorp
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 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!
 
Old 06-09-2004, 11:01 AM   #3
vasilakis
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, 11:57 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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, 11:25 AM   #5
vasilakis
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, 11:58 AM   #6
vasilakis
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 ?
 
  


Reply



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 02:54 PM
How do I install an old version of gcc thorney Linux - Newbie 1 11-25-2005 12:10 AM
unable to install latest gcc version sapadman Linux - Newbie 1 07-20-2004 05:22 PM
Newer version of glibc means i cant install gcc coop Red Hat 0 09-21-2003 01:40 AM
Install older version of gcc s9902245 Linux - Newbie 1 09-16-2003 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:14 PM.

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