NetWorker: httpd -v returns "error while loading shared libraries: cannot open shared object file"

Summary: httpd -V returns the following error on a Linux NMC server "error while loading shared libraries: libaprutil-1.so.0: cannot open shared object file: No such file or directory"

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

On a Linux NetWorker Management Console (NMC) server, the NMC httpd -V is used to show the Apache version used by the NMC's httpd process. 

The httpd -V command returns an error stating: 

./httpd: error while loading shared libraries: libaprutil-1.so.0: cannot open shared object file: No such file or directory


Example:

[root@lnx-srvr02 bin]# cd /opt/lgtonmc/apache/bin
[root@lnx-srvr02 bin]# ./httpd -v -f /opt/lgtonmc/apache/conf/httpd.conf
./httpd: error while loading shared libraries: libaprutil-1.so.0: cannot open shared object file: No such file or directory
[root@lnx-srvr02 bin]#

Cause

The NMC installation includes its own library files under /opt/lgtonmc/apache/lib/; however, httpd is only checking the operating system library files. For example: /lib64 or /usr/lib64

When using the ldd command, the missing library files can be identified along with what library path is used for the available library files:

ldd /opt/lgtonmc/apache/bin/httpd

For Example:

[root@lnx-srvr02 bin]# ldd /opt/lgtonmc/apache/bin/httpd
        linux-vdso.so.1 (0x00007fffbd3fb000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007ff78375a000)
        libaprutil-1.so.0 => not found
        libexpat.so.0 => not found
        libapr-1.so.0 => not found
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007ff783552000)
        librt.so.1 => /lib64/librt.so.1 (0x00007ff78334a000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ff783121000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff782f01000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ff782cfd000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ff782927000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff7839cb000)

Resolution

Temporary:

Set the LD_LIBRARY_PATH environment variable to include the /opt/lgtonmc/apache/lib path. Example:

[root@lnx-srvr02 ~]# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lgtonmc/apache/lib
[root@lnx-srvr02 ~]# export LD_LIBRARY_PATH
[root@lnx-srvr02 ~]#
[root@lnx-srvr02 ~]# ldd /opt/lgtonmc/apache/bin/httpd
        linux-vdso.so.1 (0x00007fffd2b37000)
        libpcre.so.1 => /opt/lgtonmc/apache/lib/libpcre.so.1 (0x00007ff74acb6000)
        libaprutil-1.so.0 => /opt/lgtonmc/apache/lib/libaprutil-1.so.0 (0x00007ff74aa8f000)
        libexpat.so.0 => /opt/lgtonmc/apache/lib/libexpat.so.0 (0x00007ff74a86d000)
        libapr-1.so.0 => /opt/lgtonmc/apache/lib/libapr-1.so.0 (0x00007ff74a636000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007ff74a42e000)
        librt.so.1 => /lib64/librt.so.1 (0x00007ff74a226000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ff749ffd000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff749ddd000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ff749bd9000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ff749803000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff74aed3000)
[root@lnx-srvr02 ~]#
[root@lnx-srvr02 ~]# /opt/lgtonmc/apache/bin/httpd -v -f /opt/lgtonmc/apache/conf/httpd.conf
Server version: Apache/2.4.55 (Unix)
Server built:   Mar 27 2023 23:41:51
[root@lnx-srvr02 ~]#

Once the session is closed, these settings are removed. 

Permanent:

One of the following methods can be used. The method used is preferential. 

1. Copy the missing library files from /opt/lgtonmc/apache/lib to the operating system library location. For example:

[root@lnx-srvr02 ~]# cp /opt/lgtonmc/apache/lib/libaprutil-1.so.0 /lib64/libaprutil-1.so.0
[root@lnx-srvr02 ~]# cp /opt/lgtonmc/apache/lib/libexpat.so.0 /lib64/libexpat.so.0
[root@lnx-srvr02 ~]# cp /opt/lgtonmc/apache/lib/libapr-1.so.0 /lib64/libapr-1.so.0
[root@lnx-srvr02 ~]#
[root@lnx-srvr02 ~]# ldd /opt/lgtonmc/apache/bin/httpd
        linux-vdso.so.1 (0x00007ffe64f98000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007ffa85e24000)
        libaprutil-1.so.0 => /lib64/libaprutil-1.so.0 (0x00007ffa85bfd000)
        libexpat.so.0 => /lib64/libexpat.so.0 (0x00007ffa859db000)
        libapr-1.so.0 => /lib64/libapr-1.so.0 (0x00007ffa857a4000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007ffa8559c000)
        librt.so.1 => /lib64/librt.so.1 (0x00007ffa85394000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ffa8516b000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffa84f4b000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ffa84d47000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ffa84971000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ffa86095000)
[root@lnx-srvr02 ~]#
[root@lnx-srvr02 ~]# /opt/lgtonmc/apache/bin/httpd -v -f /opt/lgtonmc/apache/conf/httpd.conf
Server version: Apache/2.4.55 (Unix)
Server built:   Mar 27 2023 23:41:51
[root@lnx-srvr02 ~]#

2. Create a symbolic link for the library file pointing to the /opt/lgtonmc/apache/lib path. For example:

[root@lnx-srvr02 ~]# ln -s /opt/lgtonmc/apache/lib/libaprutil-1.so.0 /lib64/libaprutil-1.so.0
[root@lnx-srvr02 ~]# ln -s /opt/lgtonmc/apache/lib/libexpat.so.0 /lib64/libexpat.so.0
[root@lnx-srvr02 ~]# ln -s /opt/lgtonmc/apache/lib/libapr-1.so.0 /lib64/libapr-1.so.0
[root@lnx-srvr02 ~]#
[root@lnx-srvr02 ~]# ls -l /lib64/libaprutil-1.so.0
lrwxrwxrwx 1 root root 41 Oct 30 15:23 /lib64/libaprutil-1.so.0 -> /opt/lgtonmc/apache/lib/libaprutil-1.so.0
[root@lnx-srvr02 ~]# ls -l /lib64/libexpat.so.0
lrwxrwxrwx 1 root root 37 Oct 30 15:23 /lib64/libexpat.so.0 -> /opt/lgtonmc/apache/lib/libexpat.so.0
[root@lnx-srvr02 ~]# ls -l /lib64/libapr-1.so.0
lrwxrwxrwx 1 root root 37 Oct 30 15:23 /lib64/libapr-1.so.0 -> /opt/lgtonmc/apache/lib/libapr-1.so.0
[root@lnx-srvr02 ~]#
[root@lnx-srvr02 ~]# ldd /opt/lgtonmc/apache/bin/httpd
        linux-vdso.so.1 (0x00007fffd85c7000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fca31576000)
        libaprutil-1.so.0 => /lib64/libaprutil-1.so.0 (0x00007fca3134f000)
        libexpat.so.0 => /lib64/libexpat.so.0 (0x00007fca3112d000)
        libapr-1.so.0 => /lib64/libapr-1.so.0 (0x00007fca30ef6000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fca30cee000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fca30ae6000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fca308bd000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fca3069d000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fca30499000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fca300c3000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fca317e7000)
[root@lnx-srvr02 ~]#
[root@lnx-srvr02 ~]# /opt/lgtonmc/apache/bin/httpd -v -f /opt/lgtonmc/apache/conf/httpd.conf
Server version: Apache/2.4.55 (Unix)
Server built:   Mar 27 2023 23:41:51

Additional Information

Affected Products

NetWorker

Products

NetWorker
Article Properties
Article Number: 000020847
Article Type: Solution
Last Modified: 30 Oct 2024
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.