Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-16-2012, 12:45 PM   #1
LQ Newbie
Registered: Mar 2012
Posts: 18

Rep: Reputation: Disabled
Trying to go back to old version of gcc

Hey guys I have a very serious problem, I was currently building a cross compiler with gcc and gcc did not build correctly however I already had a previous version of gcc on the system (gcc 4.5.3) which was completely functional, now after my build failed with gcc 4.7.0, my old gcc compiler seems not to work any more since my targets and paths all point to the broken gcc. If I issue the gcc -v command I get the following message:

Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../sources/gcc-4.7.0/configure --target= --prefix= --without-headers --with-newlib -v
Thread model: posix
gcc version 4.7.0 (GCC)

The sources folder with gcc 4.7.0 no longer exists, I am wondering if there is any way to go back to the previous working version of gcc and remove all traces of the broken one!

Please any help will be appreciated!
Old 04-16-2012, 01:07 PM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,735

Rep: Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317
Generally : You can have as many versions of gcc as you want,
installed at the same time.
( If they all are in e.g. /usr/, the option '--program-suffix='
must to be used. Example: --program-suffix=47 will provide gcc47, g++47).

Only the binaries can have convergent names / locations.
(gcc cc g++ c++ libgcc_s*).
All other files have unique locations like /usr/lib/gcc/<??>/4.7.0/<?>

A reinstall of any previous version will overwrite the gcc-4.7.0 binaries.
If the same '--prefix=$PREFIX' is used again, e.g. --prefix=/usr/



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
Install back version of gcc ufmale Linux - Newbie 5 05-01-2010 05:38 PM
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 03:54 PM
Installed GCC version doesn't match the version the kernel was compiled with AlucardZero Linux - Software 2 02-07-2008 11:24 AM
redhat fedora gcc version (compiled for 2.4.20) doesn't match kernel version 2.4.22 start1000 Linux - Software 0 03-16-2004 09:17 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 01:07 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:32 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