Okay... I'm something of a beginner when it comes to servers, and I'm having some issues with restarting apache on my Debian web server.

I just ran the following:

aptitude install apache2 openssl

Immediately afterwards, I tried to restart apache and got the following error message:

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

I ran ldd /usr/local/apache2/modules/libphp5.so and got the following output

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)

Can anyone help?

  • 1
    IT looks like your apache2 init script is refering to an old or previously installed version of apache2 (probably from sources). You can easily tell that by the directory structure. /usr/local/apache2/conf/httpd.conf actually should be located in /etc/apache2/apache2.conf . Remove the old apache and then reinstall with --purge :)
    – wojciechz
    Aug 23, 2012 at 15:26
  • dpkg -l | grep libidn?
    – quanta
    Aug 23, 2012 at 15:27
  • The problem is that I didn't actually mean to install the new version of apache2. I was just trying to install openssl, but copied and pasted the whole command by accident. Is there any way to reverse this? I have a few key sites already running on this server, so I don't want to take it down for too long! Aug 23, 2012 at 15:35
  • @quanta The output from that is rc libidn11 1.8+20080606-1 GNU libidn library, implementation of IETF I Aug 23, 2012 at 15:37
  • As already mentioned your best bet is to just upgrade Apache since you're down anyway. >Back up your site config(s) (.conf's).< Apt purge apache from system. Reinstall newest apache = sudo apt install apache2 Convert your .conf files as needed. Place them in /etc/apache2/sites-available. Then activate them: sudo a2ensite sitename.conf. Start apache2 server and look for problems in your configs. httpd.apache.org/docs/current/upgrading.html
    – B. Shea
    Aug 31, 2019 at 5:23

2 Answers 2


Install libidn11-dev package:

# apt-get install libidn11-dev

and try again.

  • When I run ldd /usr/local/apache2/modules/libphp5.so I still get libssh2.so.1 => not found Aug 23, 2012 at 15:57
  • I take it I should run dpkg -l | grep libssh2 and then app-get install the relevant package? Aug 23, 2012 at 15:59
  • Try this apt-get install libssh2-1-dev libssh2-php.
    – quanta
    Aug 23, 2012 at 16:05
  • I got the following: apt-get install libssh2-1-dev libssh2-php Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package libssh2-php Aug 23, 2012 at 16:15
  • You can remove the line what call that module on apache2.conf ( line 55 comment it ) or install libssh2 manually libssh2.org that the easy way. Also you can install it whit pecl comand, pecl install ssh2
    – Skamasle
    Sep 20, 2013 at 14:35

I had your problem in FreeBSD.
version of your libidn isn't camptiable with your PHP. You need to apt-get update, Then remove your php modules ,php itself and remove mod_php, Then install php, mod_php and their modules.
Don't foret to php -m

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .