Apache HTTP Installation Troubleshooting Guide

Putting in Apache HTTP is at all times enjoyable. A number of days in the past I put in Apache 2.4 on CentOS VM and got here throughout a number of errors.

I believed it might be useful to place it collectively for reference.

APR not discovered

[root@chandan httpd-2.4.25]# ./configure --enable-ssl
checking for chosen structure... Apache
checking for working mkdir -p... sure
checking for grep that handles lengthy strains and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking construct system kind... x86_64-unknown-linux-gnu
checking host system kind... x86_64-unknown-linux-gnu
checking goal system kind... x86_64-unknown-linux-gnu
configure: 
configure: Configuring Apache Moveable Runtime library...
configure: 
checking for APR... no
configure: error: APR not discovered.  Please learn the documentation.
[root@chandan httpd-2.4.25]#

APR stands for “Apache Moveable Runtime” and needed to be compiled from supply. In the event you’re in the identical scenario as me, here is what follows to rescue You.

Firstyou could set up APR.

  • Obtain the newest model of APR with wget
wget https://www-eu.apache.org/dist/apr/apr-1.6.3.tar.gz .
  • Extract the downloaded file
gunzip -c apr-1.6.3.tar.gz | tar xvf -
  • a brand new folder will likely be created”April-1.6.3
  • Go in and compile with the config command
./configure

It takes just a few seconds and when you’re achieved, you will get a immediate again (ensure there aren’t any errors).

  • The final step could be to put in utilizing the make command
make
make set up

Once I was achieved I attempted to put in Apache and acquired one other error.

APR util not discovered

[root@chandan httpd-2.4.25]# ./configure --enable-ssl --enable-so
checking for chosen structure... Apache
checking for working mkdir -p... sure
checking for grep that handles lengthy strains and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking construct system kind... x86_64-unknown-linux-gnu
checking host system kind... x86_64-unknown-linux-gnu
checking goal system kind... x86_64-unknown-linux-gnu
configure: 
configure: Configuring Apache Moveable Runtime library...
configure: 
checking for APR... sure
  setting CC to "gcc"
  setting CPP to "gcc -E"
  setting CFLAGS to " -g -O2 -pthread"
  setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE"
  setting LDFLAGS to " "
configure: 
configure: Configuring Apache Moveable Runtime Utility library...
configure: 
checking for APR-util... no
configure: error: APR-util not discovered.  Please learn the documentation.
[root@chandan httpd-2.4.25]#

In the event you even have the error message “APR-util not discovered”, then it’s best to try this set up the next.

  • Obtain the newest APR-util useful resource
wget https://www-eu.apache.org/dist/apr/apr-util-1.6.1.tar.gz .
  • Extract the downloaded gz file
gunzip -c apr-util-1.6.1.tar.gz | tar xvf -
  • Go to the newly created folder “apr-util-1.6.1” and set up utilizing the next instructions
./configure --with-apr=/usr/native/apr/bin/apr-1-config
make
make set up

Tried to reinstall Apache and acquired one other error.

pcre-config for libpcre not discovered

That is what I acquired.

checking whether or not the C compiler works... sure
checking for C compiler default output file title... a.out
checking for suffix of executables... 
checking whether or not we're cross compiling... no
checking for suffix of object information... o
checking whether or not we're utilizing the GNU C compiler... sure
checking whether or not gcc accepts -g... sure
checking for gcc possibility to just accept ISO C89... none wanted
checking easy methods to run the C preprocessor... gcc -E
checking for gcc possibility to just accept ISO C99... -std=gnu99
checking for pcre-config... false
configure: error: pcre-config for libpcre not discovered. PCRE is required and obtainable from http://pcre.org/

PCRE stands for Perl Appropriate Common Expressions, and this error acquired a straightforward resolution. You simply want to put in the pcre-devel bundle.

yum set up pcre-devel

Not over but, I am going to get one other one on the subsequent strive associated to OpenSSL.

OpenSSL model is just too outdated

checking whether or not to allow mod_slotmem_plain... no
checking whether or not to allow mod_ssl... checking dependencies
checking for OpenSSL... checking for user-provided OpenSSL base listing... ./configure: line 25426: cd: /usr/bin/openssl: Not a listing
/root/httpd-2.4.25
  including "-I/root/httpd-2.4.25/embrace" to CPPFLAGS
  setting MOD_CFLAGS to "-I/root/httpd-2.4.25/embrace"
  setting ab_CFLAGS to "-I/root/httpd-2.4.25/embrace"
  including "-L/root/httpd-2.4.25/lib" to LDFLAGS
  setting MOD_LDFLAGS to "-L/root/httpd-2.4.25/lib"
checking for OpenSSL model >= 0.9.8a... FAILED
configure: WARNING: OpenSSL model is just too outdated
no
checking whether or not to allow mod_ssl... configure: error: mod_ssl has been requested however can't be constructed on account of prerequisite failures
[root@chandan httpd-2.4.25]#

The very first thing to do is be sure to have the newest model of OpenSSL, which was the case in my case, so I needed to obtain the creating bundleand it was high quality.

yum set up openssl-devel

xml/apr_xml.c:35:19: deadly error: expat.h: No such file or listing exists

Whereas compiling APR I acquired this error.

[root@instance-1 apr-util-1.6.1]# make
make[1]: Getting into listing `/decide/temp/apr-util-1.6.1'
/bin/sh /usr/native/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread   -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/decide/temp/apr-util-1.6.1/embrace -I/decide/temp/apr-util-1.6.1/embrace/personal  -I/usr/native/apr/embrace/apr-1    -o xml/apr_xml.lo -c xml/apr_xml.c && contact xml/apr_xml.lo
xml/apr_xml.c:35:19: deadly error: expat.h: No such file or listing
 #embrace <expat.h>
                   ^
compilation terminated.
make[1]: *** [xml/apr_xml.lo] Error 1

In the event you get this error, you may repair it by putting in expat-devel bundle.

yum set up expat-devel

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

C compiler not discovered is typical for any software program model and you’ll repair it by putting in the compiler.

yum set up gcc

nghttp2 model is just too outdated

That is particular to while you attempt to set up Apache utilizing HTTP/2. You get the next error message.

checking whether or not to allow mod_http2... checking dependencies
checking for OpenSSL... (cached) sure
  setting MOD_LDFLAGS to "  -lssl -lcrypto -lrt -lcrypt -lpthread"
  setting MOD_CFLAGS to " "
  setting MOD_CPPFLAGS to "-DH2_OPENSSL"
checking for nghttp2... checking for user-provided nghttp2 base listing... none
checking for pkg-config alongside ... checking for nghttp2 model >= 1.2.1... FAILED
configure: WARNING: nghttp2 model is just too outdated
no
checking whether or not to allow mod_http2... configure: error: mod_http2 has been requested however can't be constructed on account of prerequisite failures

And if that’s the case, you may repair it by putting in nghttp2 as beneath.

  • Obtain the newest model of nghttp2 right here
wget https://github.com/nghttp2/nghttp2/releases/obtain/v1.37.0/nghttp2-1.37.0.tar.gz
  • Extract the downloaded file
tar -xvf nghttp2-1.37.0.tar.gz
  • A brand new folder will likely be created, go there and do the next
./configure
make
make set up

In the event you did this with out errors, rerun the Apache supply construct with HTTP2. It ought to be OK.

Lastly I used to be capable of efficiently set up Apache. If you wish to be taught extra about Apache HTTP Server Administration, take a look at this on-line course.

Leave a Comment

porno izle altyazılı porno porno