[Problem Record] Some problems encountered when installing apache in Linux, linuxapache

Source: Internet
Author: User

[Problem Record] Some problems encountered when installing apache in Linux, linuxapache

The following are some of the problems you encounter when installing apache on linux. These problems are recorded here and will be updated occasionally in the future...
1. Installation ApachePrompt APRNot found Solution

Solution:

1. Download website http://apr.apache.org/download.cgiApr-1.5.1.tar.gz 、apr-util-1.5.4.tar.gz

2. Web http://www.pcre.org/downloadPcre-8.36.tar.gz

3. decompress and install

Attached commands:

1 [root @ test ~] # Tar-zxvf xxx.tar.gz 2 [root @ test ~] #./Configure -- prefix = path // path is the installation path 3 [root @ test ~] # Make4 [root @ test ~] # Make install

4. Set the specified library location in apache

1 [root @ test ~] #. /Configure -- prefix =/usr/local/httpd-2.4.10 -- with-apr = apr-path -- with-apr-util = aprutil-path -- with-pcre = pcre-path -- enable- so // modify the path to the corresponding installation path.

5. make & make install

 

2,/xxx/httpd-2.4.x/support/AB. c: 2273: undefined reference to 'tlsv1 _ 2_client_method ',/xxx/httpd-2.4.x/support/AB. c: 2271: undefined reference to 'tlsv1 _ clientclient_method'

Error Log:

...
ab.o: In function `main':/xxx/httpd-2.4.x/support/ab.c:2273: undefined reference to `TLSv1_2_client_method'/xxx/httpd-2.4.x/support/ab.c:2271: undefined reference to `TLSv1_1_client_method'collect2: ld returned 1 exit statusmake[2]: *** [ab] Error 1make[2]: Leaving directory `/xxx/httpd-2.4.x/support'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/xxx/httpd-2.4.x/support'make: *** [all-recursive] Error 1

 

Solution:

An error occurred while installing the open-ssl library.

 

1 [root@test ~]# ./config -fPIC --prefix=path enable-shared2 [root@test ~]# ./config -t3 [root@test ~]# make depend4 [root@test ~]# make5 [root@test ~]# make test 6 [root@test ~]# make install

Specify

1 [root@test ~]# ./configure --prefix=/usr/local/httpd-2.4.10  --with-ssl=openssl-path --enable-so

 

3. relocation R_X86_64_32 against 'a local symbol' can not be used when making a shared object; recompile with-fPIC

Error Log:

1 make [4]: entering directory '/home/zfh/httpd-2.2.9/modules/filters' 2/home/user/httpd-2.2.9/srclib/apr/libtool -- silent -- mode = link gcc-g-O2-pthread -L/usr/local/zlib // lib-o mod_deflate.la-rpath/usr/local/apache2/modules-module-avoid-version mod_deflate.lo-lz 3/usr/bin/ld: /usr/local/zlib // lib/libz. a (crc32.o): relocation R_X86_64_32 against 'a local symplot' can not be used when making a shared object; recompile with-fPIC 4/usr/local/zlib/lib/libz. a: cocould not read symbols: Bad value// Pay attention to this line5 collect2: ld returned 1 exit status 6 make [4]: *** [mod_deflate.la] Error 1 7 make [4]: leaving directory '/home/zfh/httpd-2.2.9/modules/filters' 8 make [3]: *** [shared-build-recursive] Error 1 9 make [3]: leaving directory '/home/zfh/httpd-2.2.9/modules/filters' 10 make [2]: *** [shared-build-recursive] Error 111 make [2]: leaving directory '/home/zfh/httpd-2.2.9/modules' 12 make [1]: *** [shared-build-recursive] Error 113 make [1]: leaving directory '/home/zfh/httpd-2.2.9' 14 make: *** [all-recursive] Error 115 [root @ localhost httpd-2.2.9] #

The error is that the zlib library has a problem. The error message "recompile with-fPIC" is added to compile with-fPIC.

 

Solution:

1. Find the source code installation package of zlib, or download one directly. Address: http://www.zlib.net/

2. Execute the following commands:

[Root @ test ~] # Tar-zxvf zlib-1.2.3.tar.gz [root @ test ~] # Cd zlib-1.2.3 [root @ test ~] #./Configure -- prefix = path // path is the custom installation path [root @ test ~] # Vi Makefile [root @ test ~] # Find CFLAGS =-O3-DUSE_MMAP [root @ test ~] # Add-fPIC to the end, that is, CFLAGS =-O3-DUSE_MMAP-fPIC [root @ test ~] # Make & make install

3. install apache and add the -- with-zlib-1.2.3 = zlib-path Parameter

1 [root @ test ~] #./Configure -- prefix =/usr/local/httpd-2.4.10 -- with-zlib-1.2.3 = zlib-path -- enable-so // modify the path to its own installation path.

 

 

To be continued...

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.