无法在 Debian 服务器上重新启动 apache2 —“无法将 /usr/local/apache2/modules/libphp5.so 加载到服务器中”

无法在 Debian 服务器上重新启动 apache2 —“无法将 /usr/local/apache2/modules/libphp5.so 加载到服务器中”

好的...在服务器方面我还是新手,在 Debian 网络服务器上重新启动 apache 时遇到了一些问题。

我刚刚运行了以下命令:

aptitude install apache2 openssl

随后,我立即尝试重新启动 apache,并收到以下错误消息:

IS-13902:/usr/local/apache2/modules# /etc/init.d/apache restart
httpd: Syntax error on line 55 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: libidn.so.11: cannot open shared object file: No such file or directory

我运行了 ldd /usr/local/apache2/modules/libphp5.so 并得到了以下输出

linux-gate.so.1 =>  (0xb76f6000)
libcrypt.so.1 => /lib/i686/cmov/libcrypt.so.1 (0xb6d78000)
librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb6d6f000)
libmysqlclient.so.16 => /usr/local/mysql/lib/libmysqlclient.so.16 (0xb6a3d000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb6a19000)
libz.so.1 => /usr/lib/libz.so.1 (0xb6a04000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb69e5000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb69bf000)
libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb69bb000)
libnsl.so.1 => /lib/i686/cmov/libnsl.so.1 (0xb69a1000)
libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0xb6948000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb680f000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb66b4000)
libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb669b000)
/lib/ld-linux.so.2 (0xb76f7000)
libidn.so.11 => not found
libssh2.so.1 => not found
libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb6652000)
libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb64ff000)
libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0xb64bc000)
liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0xb64ad000)
libresolv.so.2 => /lib/i686/cmov/libresolv.so.2 (0xb6499000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb6482000)
libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0xb63e5000)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb63d5000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0xb63d0000)
libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb6368000)

有人可以帮忙吗?

答案1

安装libidn11-dev包:

# apt-get install libidn11-dev

然后再试一次。

答案2

我在 FreeBSD 中遇到了您的问题。
您的版本libidn与您的 PHP 不兼容。您需要apt-get update,然后删除您的php modulesphp本身并删除mod_php,然后安装phpmod_php及其模块。
不要担心php -m

相关内容