Apache httpd source installation prompts APR errors: Solution

Apache httpd source installation prompts APR error

1, download the source package HTTPD

https://www.apache.org/

Apache httpd source installation prompts APR errors: Solution

Apache httpd source installation prompts APR errors: Solution

Apache httpd source installation prompts APR errors: Solution

Select Chinese cn domain name of the site:

Apache httpd source installation prompts APR errors: Solution

Found httpd:

Apache httpd source installation prompts APR errors: Solution

2, back to the Linux CentOS using wget name so download httpd archive:

[root@magedu ~]# wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.38.tar.gz
    --2019-07-21 13:16:50--  https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.38.tar.gz
    Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.8.193, 2402:f000:1:408:8100::1
    Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.8.193|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 9187294 (8.8M) [application/x-gzip]

3, extract the downloaded files;

[root@magedu ~]# tar zxvf httpd-2.4.38.tar.gz 
            httpd-2.4.38/
            httpd-2.4.38/config.layout
            httpd-2.4.38/configure.in
            httpd-2.4.38/Makefile.win
            httpd-2.4.38/configure
            httpd-2.4.38/test/
            httpd-2.4.38/test/test_parser.c
            httpd-2.4.38/test/check_chunked
            httpd-2.4.38/test/make_sni.sh
            httpd-2.4.38/test/README
            httpd-2.4.38/test/test-writev.c
            httpd-2.4.38/test/test_limits.c
            httpd-2.4.38/test/tcpdumpscii.txt

4, before the decompression, to install the compiler and development kits;

    `   [root@magedu ~]# yum install gcc "Developent Tools"`

5, into the extracting httpd directory, view the help configure the

    [root@magedu ~]# cd httpd-2.4.38/
    [root@magedu httpd-2.4.38]# ./configure --help

6, using a configuration file to install

    [root@magedu httpd-2.4.38]# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
            checking for chosen layout... Apache
            checking for working mkdir -p... yes
            checking for grep that handles long lines and -e... /usr/bin/grep
            checking for egrep... /usr/bin/grep -E
            checking build system type... x86_64-pc-linux-gnu
            checking host system type... x86_64-pc-linux-gnu
            checking target system type... x86_64-pc-linux-gnu
            configure: 
            configure: Configuring Apache Portable(移植) Runtime library(运行库)...
            configure: 
            checking for APR... no
            configure: error: APR not found.  Please read the documentation.(错误:APR没找到,请阅读文档)

Tip error:
the configure: error: APR not found Please the Read at The Documentation.. (Error: APR not found, please read the documentation)
prompt did not find APR, use yum to install, but the installation must pay attention, you are prompted to install which software, usually in the back to add software devel, that is to install a lack of software development tools, such as the prompt apr, it would have to install apr-devel:

#yum install apr-devel

After installation is complete, then ./configure;
special attention, can not switch to another directory this period, the entire installation process of the software must be installed in this root directory;

[root@magedu httpd-2.4.38]# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for APR-util... no
configure: error: APR-util not found.  Please read the documentation.

It suggested that the lack apr-util, apr-util then install the development version, namely apr-util-devel

root@magedu httpd-2.4.39]# yum install apr-util-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: libdb-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Running transaction check
...

After the installation is complete, then ./configure

[root@magedu httpd-2.4.38]# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

Tip pcre error, then install pcre, this pcre have to install the development version, installing pcre-devel:

[root@magedu httpd-2.4.39]# yum install pcre-devel -y

After the installation is complete, then ./configure

# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure: 
...
config.status: creating include/ap_config_auto.h
config.status: executing default commands
configure: summary of build options:

                 Server Version: 2.4.39
                 C compiler:     gcc -std=gnu99
                CFLAGS:           -pthread  
                CPPFLAGS:        -DLINUX -D_REENTRANT -D_GNU_SOURCE  
               LDFLAGS:           
                 LIBS:             
                 C preprocessor: gcc -E

Finally he succeeded, using echo $ checks for success?:

[root@magedu httpd-2.4.39]# echo $?
                    0

Then make

[root@magedu httpd-2.4.39]# make
Making all in srclib
make[1]: Entering directory `/soft/httpd-2.4.39/srclib'
make[1]: Leaving directory `/soft/httpd-2.4.39/srclib'
Making all in os

Finally: make install
[root@magedu httpd-2.4.39]#make install

7. Once complete, the configuration of the PATH variable, man manual is complete, start the service, landing address, appeared a test page, it means that the installation was successful;

Apache httpd source installation prompts APR errors: Solution

Guess you like

Origin blog.51cto.com/9229045/2422354