Apache编译问题[mod_deflate.la] 错误 1
2012-09-21 21:18
344 查看
在Linux Redhat6.3下面安装apache server的时候,执行完./configure命令后在执行make命令的时候报如下错误:/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `.rodata' can not be 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 status
make[4]: *** [mod_deflate.la] 错误 1
make[4]: Leaving directory `/usr/local/httpd-2.4.3/modules/filters'
make[3]: *** [shared-build-recursive] 错误 1
make[3]: Leaving directory `/usr/local/httpd-2.4.3/modules/filters'
make[2]: *** [shared-build-recursive] 错误 1
make[2]: Leaving directory `/usr/local/httpd-2.4.3/modules'
make[1]: *** [shared-build-recursive] 错误 1
make[1]: Leaving directory `/usr/local/httpd-2.4.3'
make: *** [all-recursive] 错误 1
解决办法:
下载zlib-1.2.3.tar.gz放在/usr/local目录下执行以下命令:
tar -zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
vi Makefile
找到 CFLAGS=-O3 -DUSE_MMAP
在后面加入-fPIC,即变成CFLAGS=-O3 -DUSE_MMAP -fPIC
make && make install
然后再进入/usr/local/httpd-2.4.3这个目录执行下面的语句:
./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
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mod_deflate.la] 错误 1
make[4]: Leaving directory `/usr/local/httpd-2.4.3/modules/filters'
make[3]: *** [shared-build-recursive] 错误 1
make[3]: Leaving directory `/usr/local/httpd-2.4.3/modules/filters'
make[2]: *** [shared-build-recursive] 错误 1
make[2]: Leaving directory `/usr/local/httpd-2.4.3/modules'
make[1]: *** [shared-build-recursive] 错误 1
make[1]: Leaving directory `/usr/local/httpd-2.4.3'
make: *** [all-recursive] 错误 1
解决办法:
下载zlib-1.2.3.tar.gz放在/usr/local目录下执行以下命令:
tar -zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
vi Makefile
找到 CFLAGS=-O3 -DUSE_MMAP
在后面加入-fPIC,即变成CFLAGS=-O3 -DUSE_MMAP -fPIC
make && make install
然后再进入/usr/local/httpd-2.4.3这个目录执行下面的语句:
./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
相关文章推荐
- Apache编译make问题[mod_deflate.la] 错误 1
- Apache2.4.x 编译安装mod_perl-2.08错误
- jsp tomcat apache web.xml编译错误问题解决
- 不重新编译apache安装mod_deflate模块
- apache编译出错 --- error: mod_deflate has been requ...
- apache编译出错 error: mod_deflate has been requested
- apache设置mod_deflate压缩,错误提示
- 解决编译apache出现的问题:configure: error: APR not found . Please read the documentation
- Apache编译的错误
- 手工编译安装php后,重启apache时,libphp5.so: cannot restore segment prot after reloc: Permission denied 错误的解决办法
- 汇编学习笔记,第一个编译错误的问题
- DirectShow 在vs2005中的问题解决之其它类文件编译错误问题处理
- 问题:编译kirlog时出现错误openssl-0.9.8i/libssl.so.0.9.8': No such file
- C/C++编译时的Link.EXE错误问题与解决方法
- ZXing范例导入项目eclipse编译出现的版本错误问题
- 关于php无法加载组件和Apache启动报错“PHP错误:LoadModule takes two arguments..."的问题
- apache mod-wsgi引发的文件系统默认编码问题
- apache反向代理实现负载均衡,编译mod_proxy模块
- Linux中编译apache服务器modules文件夹缺少模块(.so)的问题
- Apache: 使用mod_deflate模块启用gzip功能