httpd: error while loading shared libraries: libexpat.so.0: cannot open shared object file
-
This error means the httpd cannot find the libexpat.so.0 library, either it is not installed or you need to tell the httpd binaries where to find the library file.
Locate the file.
$ sudo find / -name "libexpat*"
Ensure you /etc/ld.so.conf file contain the following entry
include /etc/ld.so.conf.d/*.confAdd a shared object configuration.
$ cd /etc/ld.so.conf.d $ sudo vi http-lib.conf
Add one or more entries for paths of libraries
/usr/local/libRemove shared object cache
$ rm /etc/ld.so.cache
Reload shared object configuration
$ sudo /sbin/ldconfig
View shared objects loaded for a binary
Note: Doing this before the above commands would have show libexpat.so.0 missing$ ldd httpd linux-vdso.so.1 (0x00007ffe69577000) libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007f34aca8b000) libaprutil-1.so.0 => /usr/local/lib/libaprutil-1.so.0 (0x00007f34ac864000) libexpat.so.0 => /usr/local/lib/libexpat.so.0 (0x00007f34ac63b000) libapr-1.so.0 => /usr/local/lib/libapr-1.so.0 (0x00007f34ac407000) librt.so.1 => /lib64/librt.so.1 (0x00007f34ac1ff000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f34abfc3000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f34abda6000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f34abba2000) libc.so.6 => /lib64/libc.so.6 (0x00007f34ab7fe000) /lib64/ld-linux-x86-64.so.2 (0x000056358139a000)
© Lightnetics 2024