Apache compile make problem [mod_deflate.la] Error 1

Source: Internet
Author: User

When you install Apache server under Linux Redhat6.3, when you execute the./configure command, you report the following error while executing the make command:/usr/bin/ld:/usr/local/lib/libz.a ( CRC32.O): Relocation r_x86_64_32 against. Rodata ' can not is used when making a shared object; Recompile with-fpic
/usr/local/lib/libz.a:could not read Symbols:bad value
Collect2:ld returned 1 exit Statu S
Make[4]: * * * [mod_deflate.la] Error 1
make[4]: Leaving Directory/usr/local/httpd-2.4.3/modules/filters '
make [3]: * [shared-build-recursive] Error 1
make[3]: Leaving Directory/usr/local/httpd-2.4.3/modules/filters '
Make[2] : * * * [shared-build-recursive] Error 1
make[2]: Leaving Directory/usr/local/httpd-2.4.3/modules '
Make[1]: * [Shared -build-recursive] Error 1
make[1]: Leaving directory '/usr/local/httpd-2.4.3 '
Make: * [all-recursive] Error 1

* * Solution:
Download zlib-1.2.3.tar.gz place in the/usr/local directory to execute the following command:
TAR-ZXVF zlib-1.2.3.tar.gz
CD zlib-1.2.3
./configure
VI Makefile
Find Cflags=-o3-duse_mmap
In the back to join-fpic, that becomes cflags=-o3-duse_mmap-fpic
Make && make install**

And then enter the/usr/local/httpd-2.4.3 directory to execute the following statement:
./configure–prefix=/usr/local/apache2–with-apr=/usr/local/apr/bin/apr-1-config–with-apr-util=/usr/local/ apr-util/bin/apu-1-config–with-pcre=/usr/local/pcre/bin/pcre-config–with-zlib-1.2.3=/usr/local/zlib-1.2.3– Enable-so

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.