Operating System - Linux
1752577 Members
4452 Online
108788 Solutions
New Discussion

Re: configure error no acceptable C compiler found in path in Red Hat

 
Tito Hall
Occasional Contributor

configure error no acceptable C compiler found in path in Red Hat

To All:

I want to install Apache 2.2.16 (httpd-2.2.16) on Red Hat (Linux VM). When I try to configure as follows:

./configure \ --prefix=/usr/local/apache2 \ --with-mpm=prefork \ --enable-ssl \ --disable-charset-lite \ --disable-include \ --disable-env \ --enable-setenvif \ --disable-status \ --disable-autoindex \ --disable-asis \ --disable-cgi \ --disable-negotiation \ --disable-imap \ --disable-actions \ --disable-userdir \ --disable-alias \ --disable-so

I get an error at the end:

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

I have check several issues such as:

$PATH: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/usr/libexec/gcc

# rpm –qa | grep gcc
libgcc-4.1.2-42.el5
libgcc-4.1.2-42.el5
compat-libgcc-296-2.96-138

From this point I’m in a daze as to my next move, whether I should look into if my compiler is supporting or if a different version of gcc is needed.

Please advice asap, thanks in advance.

T. Hall
12 REPLIES 12
Steven Schweda
Honored Contributor

Re: configure error no acceptable C compiler found in path in Red Hat

> # rpm --qa | grep gcc
> libgcc-4.1.2-42.el5
> libgcc-4.1.2-42.el5
> compat-libgcc-296-2.96-138

Those are C run-time libraries, which are
used by compiled programs. The compiler
itself is not in that list.

> [...] or if a different version of gcc is
> needed.

_Some_ version of GCC is needed. You don't
seem to have one.

type gcc
gcc --version

On my Debian system, it's "/usr/bin/gcc". I
don't know where Red Hat puts it, but that
PATH looks as if it hits all the popular
spots. Knowing nothing, I'd guess that you
need a plain "gcc" rpm, not only "libgcc"
stuff.
Steven Schweda
Honored Contributor

Re: configure error no acceptable C compiler found in path in Red Hat

> I want to install Apache 2.2.16
> (httpd-2.2.16) [...]

If all you want is to _install_ Apache, then
you shouldn't need a C compiler, only a
complete Apache kit for your OS+hardware
combination. If you want to _build_ Apache
from a source kit, _then_ you need a C
compiler.
Tito Hall
Occasional Contributor

Re: configure error no acceptable C compiler found in path in Red Hat

Steven,

Iâ m very green to this process but ultimately I want to install Apache 2.2.16 like you detected. Base on the information I collected online itâ s pretty consistent that in order to install an Apache HTTP server 2.* (htppd-2.2.16) on Unix and Unix-like (Linux) system I have to follow these steps: download, extract, configure, compile, install, customize and test (http://httpd.apache.org/docs/2.0/install.html). Even after following these steps Iâ m consistently coming up with errors like mention above.

Researching the errors its been mention that I may need a compiler or a certain gcc. So, again Iâ m blindly following examples and if Iâ m suspecting that I downloaded a complete Apache Kit from their website; however, if Iâ m making adjustments instead of accepting default settings in the configuration then I might need a C compiler, right?

By the way thanks for responding, Iâ m in this on my own so itâ s refreshing to bounce ideas off of someone else!
Tim Nelson
Honored Contributor

Re: configure error no acceptable C compiler found in path in Red Hat

2.2.3 is available as an RHEL rpm.. takes 20 seconds to install..

if you absolutely must have the latest version then download from apache.org and compile yourself.

be sure to read all the release information especially the co-requisites, pre-requisites and specific compiler requirements.

be prepared to spend some time doing this.
Tito Hall
Occasional Contributor

Re: configure error no acceptable C compiler found in path in Red Hat

If 2.2.3 is easier and is compatible with apache I'll just go with that.

Thanks for the assistance.
Steven Schweda
Honored Contributor

Re: configure error no acceptable C compiler found in path in Red Hat

> [...] if I'm making adjustments instead of
> accepting default settings in the
> configuration then I might need a C
> compiler, right?

No. Read this again:

> If all you want is to _install_ Apache, then
> you shouldn't need a C compiler, only a
> complete Apache kit for your OS+hardware
> combination. If you want to _build_ Apache
> from a source kit, _then_ you need a C
> compiler.

_Configuring_ Apache is something which is
done after it's (built and) installed.

Not trying to be unkind, but if this much
isn't clear, then your chances of building
Apache yourself are pretty poor.

> If 2.2.3 is easier and is compatible with
> apache I'll just go with that.

"compatible with apache"? He's talking about
a version _of_ Apache. Until you know more,
you should stick with pre-built RPM kits for
your system, and avoid source kits which
require more work than simple installation
(steps like, say, "configure" and "compile").
Alan_152
Honored Contributor

Re: configure error no acceptable C compiler found in path in Red Hat

If this is redhat, then the command you need to install gcc (not really needed in this case, but will probably be needed for something else) is:

# yum install gcc

If you want apache, then the command to install that would be:

# yum install httpd
Tito Hall
Occasional Contributor

Re: configure error no acceptable C compiler found in path in Red Hat

Let me retract my statement and repeat what they ask me to do:

â The first step in order to install Apache with SSL/TLS support is to configure and install the Apache 2 web server, and create a user and group named "apache". A secure way of installing Apache's 2.0 has already been published on SecurityFocus in the article Securing Apache 2.0: Step-by-Step. The only difference to that process is to enable mod_ssl and mod_setenvif, which is required to provide compatibility with some versions of MS Internet Explorer, as follows (changes shown in bold):

./configure \ --prefix=/usr/local/apache2 \ --with-mpm=prefork \ --enable-ssl \ --disable-charset-lite \ --disable-include \ --disable-env \ --enable-setenvif \ --disable-status \ --disable-autoindex \ --disable-asis \ --disable-cgi \ --disable-negotiation \ --disable-imap \ --disable-actions \ --disable-userdir \ --disable-alias \ --disable-so

Nevertheless, after this step my original error stated above occurs.
Tito Hall
Occasional Contributor

Re: configure error no acceptable C compiler found in path in Red Hat

Alan,

Just for sake of argument I tired yum install for both httpd and httpd-2.2.16

[root@uncc49ers ~]# yum install httpd
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.

RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
No package httpd available.
Nothing to do
[root@uncc49ers ~]# yum install httpd-2.2.16
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
No package httpd-2.2.16 available.
Nothing to do
[root@uncc49ers ~]#