httpd启动不能加载模块

简介:
   最近想把原来在RHEL4.X下安装的软件移植到RHEL5.4上,费劲千辛万苦的努力,终于应用程序可以跑了,但是最后卡在HTTP上,由于程序需要些设置,启动APACHE的时候,发现不能启动,报错如下。。。
[root@risserver ~]# service httpd start
Starting httpd: 
[root@risserver ~]# service httpd stop
Stopping httpd:                                            [  OK  ]
[root@risserver ~]# service httpd start
Starting httpd: httpd: Syntax error on line 206 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_pool_get_parent
                                                           [FAILED]
 
     
 OK,那我重新编译下这个模块,接着操作如下:
 
 
[root@risserver ~]#  apxs -c -n -a -i /usr/lib/httpd/modules/mod_jk2.so 
/usr/lib/apr-1/build/libtool --silent --mode=link gcc -o /usr/lib/httpd/modules/mod_jk2.la  -rpath /usr/lib/httpd/modules -module -avoid-version    /usr/lib/httpd/modules/mod_jk2.so
/usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/apr-1/build/libtool' /usr/lib/httpd/modules/mod_jk2.la /usr/lib/httpd/modules
/usr/lib/apr-1/build/libtool --mode=install cp /usr/lib/httpd/modules/mod_jk2.la /usr/lib/httpd/modules/
cp /usr/lib/httpd/modules/.libs/mod_jk2.so /usr/lib/httpd/modules/mod_jk2.so
cp /usr/lib/httpd/modules/.libs/mod_jk2.lai /usr/lib/httpd/modules/mod_jk2.la
cp /usr/lib/httpd/modules/.libs/mod_jk2.a /usr/lib/httpd/modules/mod_jk2.a
chmod 644 /usr/lib/httpd/modules/mod_jk2.a
ranlib /usr/lib/httpd/modules/mod_jk2.a
PATH="$PATH:/sbin" ldconfig -n /usr/lib/httpd/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib/httpd/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/lib/httpd/modules/mod_jk2.so
 
看到这里,我以为大功可以告成了,

[root@risserver ~]# service httpd start
Starting httpd: httpd: Syntax error on line 206 of /etc/httpd/conf/httpd.conf: Can't locate API module structure `jk2_module' in file /etc/httpd/modules/mod_jk2.so: /etc/httpd/modules/mod_jk2.so: undefined symbol: jk2_module
                                                           [FAILED]
 
 
     这时有点懵了,咋搞的啊,RP太背了啊,再来一次
 

[root@risserver ~]# apxs -c  /usr/lib/httpd/modules/mod_jk2.so 
/usr/lib/apr-1/build/libtool --silent --mode=link gcc -o /usr/lib/httpd/modules/mod_jk2.la  -rpath /usr/lib/httpd/modules -module -avoid-version    /usr/lib/httpd/modules/mod_jk2.so
 

[root@risserver ~]# apxs  -n -a -i /usr/lib/httpd/modules/mod_jk2.so 
/usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/apr-1/build/libtool' /usr/lib/httpd/modules/mod_jk2.so /usr/lib/httpd/modules
/usr/lib/apr-1/build/libtool --mode=install cp /usr/lib/httpd/modules/mod_jk2.so /usr/lib/httpd/modules/
cp /usr/lib/httpd/modules/mod_jk2.so /usr/lib/httpd/modules/mod_jk2.so
cp: `/usr/lib/httpd/modules/mod_jk2.so' and `/usr/lib/httpd/modules/mod_jk2.so' are the same file
apxs:Error: Command failed with rc=65536
.
[root@risserver ~]# apxs -a -i /usr/lib/httpd/modules/mod_jk2.so 
apxs:Error: Sorry, cannot determine bootstrap symbol name.
apxs:Error: Please specify one with option `-n'.
 

[root@risserver ~]# apxs -n -a -i /usr/lib/httpd/modules/mod_jk2.so

/usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/apr-1/build/libtool' /usr/lib/httpd/modules/mod_jk2.so /usr/lib/httpd/modules
/usr/lib/apr-1/build/libtool --mode=install cp /usr/lib/httpd/modules/mod_jk2.so /usr/lib/httpd/modules/
cp /usr/lib/httpd/modules/mod_jk2.so /usr/lib/httpd/modules/mod_jk2.so
cp: `/usr/lib/httpd/modules/mod_jk2.so' and `/usr/lib/httpd/modules/mod_jk2.so' are the same file
apxs:Error: Command failed with rc=65536
.
    至此,基本绝望了,不知道怎么弄了,杯具啊,离成功只差一步啊,前面那么多困难都通过了,基本程序都可以跑起来了,剩下apache不能启动。。。。。
     不知道上述问题如何解决,
本文转自你是路人甲还是霍元甲博客51CTO博客,原文链接http://blog.51cto.com/world77/346220如需转载请自行联系原作者

world77
相关文章
|
缓存 JavaScript 应用服务中间件
Nginx+Tomcat代理环境下JS无法完全加载问题
Nginx+Tomcat代理环境下JS无法完全加载问题
181 0
|
6月前
|
应用服务中间件 Linux 网络安全
源码方式安装nginx及其依赖并设置服务开机启动
源码方式安装nginx及其依赖并设置服务开机启动
165 0
|
应用服务中间件 nginx
systemctl 启动/停止/重新加载 nginx
systemctl 启动/停止/重新加载 nginx
1013 0
|
应用服务中间件 nginx Windows
Windows修改nginx.conf配置文件然后重新加载报错
Windows修改nginx.conf配置文件然后重新加载报错
292 0
|
JSON 监控 JavaScript
配置文件启动
配置文件启动
90 0
|
网络协议 安全 应用服务中间件
二、Nginx | 实用模块介绍与加载
二、Nginx | 实用模块介绍与加载
二、Nginx | 实用模块介绍与加载
|
Windows
Qt6 程序开机自启找不到配置文件及外部程序
用开机助手这个软件来举例,软件在编译打包完成后,正常启动后,可以正常读取到与其同级目录下BAT文件中的关机脚本的
372 0
Qt6 程序开机自启找不到配置文件及外部程序
|
NoSQL Linux Redis
Linux安装redis,启动配置不生效(指定启动加载配置文件)
一、今天有个同学问我,为什么明明安装了redis,修改了配置,启动的时候,配置还是不生效。如下图是安装后的redis文件图。 root@iZbp17cj14ulhfrlj02rkaZ:~/redis-4.
3868 0
|
应用服务中间件 C语言 nginx
|
应用服务中间件 nginx tengine
下一篇
无影云桌面