apache缺少模块解决方法

找到一台老古董机器

[[email protected] conf]# cat /etc/redhat-release
CentOS release 5.6 (Final)

[[email protected] conf]# openssl version
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

[[email protected] 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.

[[email protected] 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下载到这个机器上,直接就报错了

[[email protected] ~]# 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 放进去 依然报错

[[email protected] ~]# 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

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

[[email protected] ~]# 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
[[email protected] ~]# ldconfig -l /lib64/libc-2.5.so
ldconfig: /lib64/libc.so.6 is not a symbolic link

[[email protected] ~]# 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/

[[email protected] modules]# cd /usr/local/service/apache2.2/modules/
[[email protected] modules]# ls
httpd.exp

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

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

[[email protected] modules]# cd /usr/local/service/apache2.2/modules/
[[email protected] modules]# ls
httpd.exp  mod_ssl.so

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

[[email protected] modules]# service httpd configtest
Syntax OK

  完美

  

  

  

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

时间: 2024-08-04 07:01:29

apache缺少模块解决方法的相关文章

asp.net调用非托管dll,无法加载 DLL,找不到指定模块解决方法。

最近开发一个项目,里面用到了非.net开发的一个dll文件接口,发现发布到window2003服务器上后,运行网站总是提示 "无法加载 DLL"D:\11\1.dll": 找不到指定的模块. (异常来自 HRESULT:0x8007007E). "这个错误.但是我在本地xp系统上调试是可以的. dll使用com调用如下 [DllImport(@"D:\11\1.dll", EntryPoint = "aaa", CharSet

安装xampp后apache不能启动解决方法

(安装提示:重要! 由于激活用户帐户控制(uac)在您的系统的一些XAMPP的功能可能是限制.使用UAC请避免将XAMPP安装到C:程序文件(x86)(缺少写的权限).在此设置后,或与系统配置实用程序禁用UAC.) Important! Because an activated User Account Control (UAC) on your sytem some functions of XAMPP are possibly restricted. With UAC please avoi

Skype无法启动,提示缺少KERNEL32解决方法

最近社区不少朋友反映,在XP系统上安装Skype后不能正常启动,提示缺少KERNEL32.dll 如下图: 遇到这个问题,有几种情况. 1.系统不是 XP SP3 Skype正常运行需要系统版本为XP SP3,请检查你的XP系统版本,如果低于SP3系统,请升级系统. (绝对不建议大家使用Ghost封装的D版系统,因为系统文件会被修改或有删减) 2.KERNEL32.dll 错误 KERNEL32.dll是系统的重要内核文件,但有些程序病毒等可能会将其更改.解决的方法是下载原版文件进行替换. a:

python中使用selenium调用Firefox缺少geckodriver解决方法

from selenium import webdriver driver=webdriver.Firefox() 会报错 解决方法: 因为缺少geckodriver.exe,先到https://github.com/mozilla/geckodriver/releases下载对应版本的geckofriver.exe 然后放到python的安装目录与python.exe在同一目录下

Apache启动错误解决方法

xampp启动时显示的错误为: 10:40:18 [Apache] Error: Apache shutdown unexpectedly.10:40:18 [Apache] This may be due to a blocked port, missing dependencies, 10:40:18 [Apache] improper privileges, a crash, or a shutdown by another method.10:40:18 [Apache] Press t

SELinux导致Apache 403错误解决方法

将DocumentRoot设在/var/www/html下可以访问 但是将DocumentRoot设在其他目录(如:/webroot)下就出现Forbidden了.在./etc/httpd/conf/httpd.conf中的相关部分是这样的: Alias /query "/home/query" <Directory "/home/query"> Options Indexes MultiViews AllowOverride None Order al

Apache 403 错误解决方法-让别人可以访问你的服务器

参考网址:http://www.cnblogs.com/mrlaker/archive/2013/04/29/3050888.html http://www.jb51.net/article/61193.htm 问题描述: 解决方案: 也可以路径为(\xampp\apache\conf\extra\httpd-xampp.conf) 把如下标签中的Require local替换成Require all granted,然后大功告成! 注意:版本不同改法也不同. 以前是将 deny from al

xampp Apache Access forbidden 解决方法

将httpd.conf中的 <Directory /> AllowOverride none Require all denied </Directory> 改成 <Directory /> Order deny,allow Allow from all </Directory> 即可

selenium缺少chromedriver解决方法

1.安装好selenium,运行一段测试代码: from selenium import webdriver brower = webdriver.Chrome() brower.get('www.baidu.com') brower.quit() 如果浏览器没有调起来,并提示以下错误:selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. 按字面