2

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.

Anash
  • 29
  • 1
  • 1
  • 5
  • What's preventing you from using `yum`? Can you get the individual RPMs and install those manually? – Philip Kendall Jun 11 '12 at 05:53
  • My system is not registered with RHN. yum update Loaded plugins: katello, product-id, security, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Setting up Update Process No Packages marked for Update – Anash Jun 11 '12 at 07:51
  • I have tried installing rpms like gcc-3.4.3-9.EL4.src.rpm,gcc-4.1.2-50.el5.src.rpm rtc. Also I have tried with gcc-4.7.0 too. – Anash Jun 11 '12 at 07:57
  • No point in installing GCC source code, but a GCC binary should satisfy it. – user207421 Jun 11 '12 at 08:17
  • GCC binary didnt work for me. The above ./configure result id the one I got when I tried configuring gcc-4.7.0. I referred to many forums, but didnt wokr for me. – Anash Jun 11 '12 at 08:39
  • install gcc using yum.You can use CentOS base repository – rkosegi Jun 11 '12 at 10:00
  • Thanks! But could you give more details on how to so the same – Anash Jun 11 '12 at 10:16

2 Answers2

3

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

Lakshmikandan
  • 4,301
  • 3
  • 28
  • 37
0

Thanks for all those helped me. I have succesfully make gcc work. I got rpm files for gcc and http://rpmfind.net//linux/RPM/centos/5.8/x86_64/CentOS/

Anash
  • 29
  • 1
  • 1
  • 5