我们在启动 Apache 时遇到了这个问题。Apache的版本是:2.0.61。
我们面临的错误如下:
/home/ndipiazza/apache-2.0/bin/rotatelogs:加载共享库时出错:libaprutil-0.so.0:无法打开共享对象文件:没有这样的文件或目录
但是,您可以从以下命令中看到该文件确实存在:
[ /home/ndipiazza/apache-2.0/bin ]
ndipiazza@mybox > ldd /home/ndipiazza/apache-2.0/bin/httpd
linux-vdso.so.1 => (0x00007fffe3de3000)
libssl.so.0.9.8 => /usr/lib64/libssl.so.0.9.8 (0x00007f0a55c61000)
libcrypto.so.0.9.8 => /usr/lib64/libcrypto.so.0.9.8 (0x00007f0a558e5000)
libaprutil-0.so.0 => /home/ndipiazza/apache-2.0/lib/libaprutil-0.so.0 (0x00007f0a556cd000)
libexpat.so.0 => /home/ndipiazza/apache-2.0/lib/libexpat.so.0 (0x00007f0a554a7000)
libapr-0.so.0 => /home/ndipiazza/apache-2.0/lib/libapr-0.so.0 (0x00007f0a5527e000)
librt.so.1 => /lib64/librt.so.1 (0x00007f0a55075000)
libm.so.6 => /lib64/libm.so.6 (0x00007f0a54e1f000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f0a54be3000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f0a549cb000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0a547ae000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f0a545a9000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0a5424b000)
libz.so.1 => /lib64/libz.so.1 (0x00007f0a54035000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0a55ec3000)
[ /home/ndipiazza/apache-2.0/lib ]
ndipiazza@mybox > ll
total 3764
-rw-r----- 1 nddsrvr ndd 7891 2012-03-29 09:04 apr.exp
-rw-r----- 1 nddsrvr ndd 3692 2012-03-29 09:04 aprutil.exp
-rw-r--r-- 1 nddsrvr ndd 1124092 2012-03-29 09:04 libapr-0.a
-rw-r----- 1 nddsrvr ndd 851 2012-03-29 09:04 libapr-0.la
lrwxrwxrwx 1 nddsrvr ndd 18 2012-03-29 09:04 libapr-0.so -> libapr-0.so.0.9.16
lrwxrwxrwx 1 nddsrvr ndd 18 2012-03-29 09:04 libapr-0.so.0 -> libapr-0.so.0.9.16
-rwxr-x--x 1 nddsrvr ndd 614060 2012-03-29 09:04 libapr-0.so.0.9.16
-rw-r--r-- 1 nddsrvr ndd 622102 2012-03-29 09:04 libaprutil-0.a
-rw-r----- 1 nddsrvr ndd 841 2012-03-29 09:04 libaprutil-0.la
lrwxrwxrwx 1 nddsrvr ndd 22 2012-03-29 09:04 libaprutil-0.so -> libaprutil-0.so.0.9.16
lrwxrwxrwx 1 nddsrvr ndd 22 2012-03-29 09:04 libaprutil-0.so.0 -> libaprutil-0.so.0.9.16
-rwxr-x--x 1 nddsrvr ndd 344948 2012-03-29 09:04 libaprutil-0.so.0.9.16
-rw-r--r-- 1 nddsrvr ndd 687836 2012-03-29 09:04 libexpat.a
-rwxr-xr-x 1 nddsrvr ndd 811 2012-03-29 09:04 libexpat.la
lrwxrwxrwx 1 nddsrvr ndd 17 2012-03-29 09:04 libexpat.so -> libexpat.so.0.1.0
lrwxrwxrwx 1 nddsrvr ndd 17 2012-03-29 09:04 libexpat.so.0 -> libexpat.so.0.1.0
-rwxr-xr-x 1 nddsrvr ndd 404946 2012-03-29 09:04 libexpat.so.0.1.0
我们尝试了
export LD_LIBRARY_PATH=/home/ndipiazza/apache-2.0/lib:$LD_LIBRARY_PATH
然后启动apache,但这并没有解决问题。
我们能做什么?