Ask Your Question

gcc compiler installation

asked 2013-02-13 03:57:41 -0500

amine gravatar image

hi everyone,

I am trying to install a gcc compiler (offline), so i downloaded a gcc gz file and unzip according to the procedure, when i run ./configure to check whether the system is compatible, then i were asked to install three prerequisites software (gmp, mpc and mpfr) in order to complete the installation.

So i installed these three packages in gz file, when i trying to run ./configure in the packages, there's an error prompt out "configure: error: could not find a working compiler"

I am lost why do i need a compiler in order to install the prerequisites software of gcc compiler? Can anyone help? Thanks in advanced.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-02-13 06:55:09 -0500

ilukrismx gravatar image

updated 2013-02-13 07:05:42 -0500

Hi! I hope this may help you, so there we go. As seeing in the wiki of gcc here the /configure inside the source code is not supported so this is what we are going to do.
First we create a new directory

mkdir gcc-src
cd gcc-src

Now we should unzip that .tar.gz file

tar xzf path-of-tar-file/gcc-version.tar.gz

So as GCC has some prerequisites we should run instead of "/configure" inside of our source code directory


This will download and untar inside the source code directory MPR, MPC and GMP
Now here is the deal, we should create a mirror-directory (just for call it something) so we get out of our source-code-directory and make a new one right next to our source code.

mkdir gcc-build

and move into our new directory

cd gcc-build

In this new directory we can run the /configure so we create a path to our source code folder and run the /configure


this would create a "make" file in our gcc-build directory so we just run make inside the directory


finally we install gcc

make install

And I think that would be pretty much about it =) , this way you wont be touching the source-code-directory by building in the mirror-directory. And of course can delete that gcc-build and make another one just by following those steps.

edit flag offensive delete link more


Thanks, good answer!

erihe251 gravatar imageerihe251 ( 2016-02-29 10:11:35 -0500 )edit

answered 2013-02-13 06:06:26 -0500

  1. Download and burn the DVD .iso for Fedora

Mount your DVD media:

mount -r /dev/cdrom /media/Fedora

Create file /etc/yum.repos.d/Fedora-Media.repo with the following content:

name=Fedora-$releasever - Media

Use your DVD to install "Development Tools"

yum --disablerepo=\* --enablerepo=c5-media groupinstall "Development Tools"

Credits to Bakha Nurzhanov

Other way is to mount Fedora DVD, and run system-config-packages in a terminal, check the packages you wanted to install under development-tools, then apply your change.

edit flag offensive delete link more

Question Tools


Asked: 2013-02-13 03:57:41 -0500

Seen: 8,933 times

Last updated: Feb 13 '13