configure gcc in RHEL5 - no acceptable C compiler found in $PATH

Anash picture Anash · Jun 11, 2012 · Viewed 17.6k times · Source

I want to install Apache in RHEL5. While configuring httpd-2.4.2 following error came:

configure: error: no acceptable C compiler found in $PATH

So I downloaded gcc-4.7.0 and tried configuring it. Still the same error is coming.

$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libitm support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/httproot/gcc-4.7.0':
configure: error: no acceptable C compiler found in $PATH

Following are some of the status results:

  • gcc --version
    bash: gcc: command not found
    
  • rpm -qi gcc
    package gcc is not installed
    
  • which gcc
    /usr/bin/which: no gcc in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/bin:/bin)
    
  • whereis gcc
    gcc: /usr/libexec/gcc
    

I can't use yum. So please help in resolving this issue.

Answer

lakshmikandan picture lakshmikandan · Jun 14, 2014

I could not found any packages from the below URL

http://rpmfind.net//linux/RPM/centos/5.8/x86_64/CentOS/

Finally found the solution :

yum groupinstall "Development tools"

or

yum install gcc glibc glibc-common gd gd-devel