Apache2.4.9增加压缩模块的时候遇到一个报错"httpd: Syntax error on line 103 of /byrd/server/httpd-2.4.9/conf/httpd.conf: Cannot load modules/mod_deflate.so into server: /byrd/server/httpd-2.4.9/modules/mod_deflate.so: undefined symbol: inflateEnd",网络上找了下解决方法,供参考:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[root@lamp metadata]# pwd /byrd/tools/httpd-2.4.9/modules/metadata [root@lamp metadata]# find / -name "mod_deflate.c" /byrd/tools/httpd-2.4.9/modules/filters/mod_deflate.c [root@lamp metadata]# /usr/local/apache/bin/apachectl -l Compiled in modules: core.c mod_so.c http_core.c worker.c [root@lamp metadata]# cd /byrd/tools/httpd-2.4.9/modules/filters/ [root@lamp filters]# /usr/local/apache/bin/apxs -a -i -c mod_deflate.c [root@lamp filters]# /usr/local/apache/bin/apachectl -l Compiled in modules: core.c mod_so.c http_core.c worker.c [root@lamp filters]# /usr/local/apache/bin/apachectl -M httpd: Syntax error on line 103 of /byrd/server/httpd-2.4.9/conf/httpd.conf: Cannot load modules/mod_deflate.so into server: /byrd/server/httpd-2.4.9/modules/mod_deflate.so: undefined symbol: inflateEnd |
网络上的解决方法:
一:mod_deflate.so 的前面加载zlib.so
0 1 |
LoadFile /usr/lib64/libz.so #LoadFile /usr/lib/libz.so# #lib是32位系统 lib64是64位 LoadModule deflate_module modules/mod_deflate.so |
2:vim /usr/local/apache2/bin/apr-config
0 1 |
修改LDFLAGS=" " 为 LDFLAGS="-lz" 然后再apxs -ica mod_deflate.c |
申明:内容来自网络,原创未知。
参考:http://www.uddtm.com/server/web/1449.html
参考:http://apipi.blog.163.com/blog/static/422663812010327115953744/
参考:http://www.linuxidc.com/Linux/2013-12/94437.htm SourceByrd's Weblog-https://note.t4x.org/error/mod-deflate-undefined-symbol-inflateend/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!