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不能启动。。。。。
     不知道上述问题如何解决,

你可能感兴趣的:(加载,职场,模块,httpd,休闲)