码迷,mamicode.com
首页 > Web开发 > 详细

apache缺少模块解决方法

时间:2018-08-13 18:04:49      阅读:436      评论:0      收藏:0      [点我收藏+]

标签:目录   crypto   rar   invalid   解决方法   written   err   module   代码   

找到一台老古董机器

[root@resource conf]# cat /etc/redhat-release 
CentOS release 5.6 (Final)

[root@resource conf]# openssl version
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

[root@resource conf]# ldd --version
ldd (GNU libc) 2.5
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

[root@resource conf]# gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
Copyright (C) 2006 Free Software Foundation, Inc.
本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;
包括没有适销性和某一专用目的下的适用性担保。

 开始的想法很简单,直接把别的机器上mod_ssl.so下载到这个机器上,直接就报错了

[root@resource ~]# service httpd configtest
httpd: Syntax error on line 201 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_ssl.so into server: /lib64/libc.so.6: version `GLIBC_2.7‘ not found (required by /usr/lib64/libcrypto.so.10)

 然后把libc.so.6和libcrypto.so.10 放进去 依然报错

[root@resource ~]# ldconfig /lib64/libc-2.5.so 
ldconfig: /lib64/libc.so.6 is not a symbolic link
ldconfig: /usr/lib64/libcrypto.so.10 is not a symbolic link

[root@resource ~]# ls
ls: error while loading shared libraries: /lib64/libc.so.6: ELF file OS ABI invalid
[root@resource ~]# ln -s /lib64/libc-2.5.so /lib64/lib
Display all 129 possibilities? (y or n)

[root@resource ~]# ln -s /lib64/libc-2.5.so /lib64/libc.so.6
ln: error while loading shared libraries: /lib64/libc.so.6: ELF file OS ABI invalid
[root@resource ~]# ldconfig -l /lib64/libc-2.5.so 
ldconfig: /lib64/libc.so.6 is not a symbolic link

[root@resource ~]# cp /lib64/libc-2.5.so /lib64/libc.so.6
cp: error while loading shared libraries: /lib64/libc.so.6: ELF file OS ABI invalid

  这个破玩意简直崩溃,幸亏远程连接没断开,几乎所有命令都不能用了。幸好用这个屌丝的办法解决了

  https://blog.csdn.net/czw698/article/details/48264871  一身冷汗好吗,生产环境搞成这样~~!

 

然后换思路,重新编译apache,把prefix目录改成其他的。

  历史版本下载  http://archive.apache.org/dist/

./configure --prefix=/usr/local/service/httpd --enable-so --enable-ssl --enable-cgi --enable-rewrite --enable-modules=most --enable-mpms-shared=all --with-zlib --with-pcre --with-apr=/usr/local/service/apr --with-apr-util=/usr/local/service/apr-util --sysconfigdir=/usr/local/service/httpd/conf/

[root@resource modules]# cd /usr/local/service/apache2.2/modules/
[root@resource modules]# ls
httpd.exp

  what?mod_ssl.so去哪了?各种so去哪了,我明明写的enable-modules。各种修改编译命令。仍然没有。百度一下吧,百度各位大神让用apxs命令编译

[root@resource conf]# /usr/local/service/apache2.2/bin/apxs -a -i -c -L /usr/lib/openssl/engines/lib -c *.c -lcrypto -lssl -ldl

[root@resource modules]# cd /usr/local/service/apache2.2/modules/
[root@resource modules]# ls
httpd.exp  mod_ssl.so

  激动人心的时刻到了,把mod_ssl.so复制到原来apache模块目录/etc/httpd/modules

[root@resource modules]# service httpd configtest
Syntax OK

  完美

  

   

  

 

apache缺少模块解决方法

标签:目录   crypto   rar   invalid   解决方法   written   err   module   代码   

原文地址:https://www.cnblogs.com/guoyabin/p/9469596.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!