I have a virtual machine running RHEL7. I am trying to install GCC from source following


I am unable to do

yum groupinstall "Development Tools"


yum install gcc

since I haven't connected to the YUM repos.

When I try to run the ./configure I get this error:

No acceptable C Compiler found in $PATH.

How can I add a C compiler in the PATH when I am trying to install a compiler itself?

Please help me

  • How did you get the source for gcc on the machine without being able to copy an RPM from CentOS7? – Thomas Dickey Sep 18 '16 at 16:21
  • I downloaded the gcc tar from a GNU mirror site on the RHEL7 virtual machine. – Thanu Sep 18 '16 at 16:25
  • Install the (I believe it's called) "Development Tools" as package group instead of compiling your own version of GCC. – Martin Sugioarto Sep 18 '16 at 16:30
  • Thanks! I installed precisely that from the CentOS 7 mirror – Thanu Sep 18 '16 at 17:32

gcc (and almost any package you need from RHEL7) can be provided by CentOS7, since it is built with the same source and configuration details. You could get that (and any needed dependencies) from CentOS's website:


  • Thanks a lot! This helped. Added this as my repository and was able to install development tools – Thanu Sep 18 '16 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.