After installing the shared library, you should be aware of the shared library path setup issues, as follows:
1) If the shared library file is installed in the/lib or/usr/lib directory, then you need to execute the ldconfig command
The purpose of the Ldconfig command is to search for a shareable dynamic-link library (in the form of lib*.so*) in the default search directory (/lib and/usr/lib) and the directory listed in the dynamic library configuration file/etc/ld.so.conf, creating a dynamic Loader program ( ld.so) The required connection and cache files. The cache file defaults to/etc/ld.so.cache, which holds a list of queued dynamic-link library names.
2) If the shared library file is installed in/usr/local/lib (many open source shared libraries will be installed in this directory) or other "non-/lib or/usr/lib" directories, then the new Shared library directory will be added to the shared library configuration file before the Ldconfig command is executed/etc/ Ld.so.conf, the following:
# cat/etc/ld.so.conf
Include ld.so.conf.d/*.conf
# echo "/usr/local/lib" >>/etc/ld.so.conf
# Ldconfig
3) If the shared library file is installed in a different "non-/lib or/usr/lib" directory, but does not want to add the path in the/etc/ld.so.conf (or there is no permission to add the path). That can export a global variable ld_library_path, and then run the program will go to this directory to find the shared library.
Ld_library_path means to tell loader which directories can be found in the shared library. You can set up multiple search directories separated by colons. For example, install a MySQL into the/usr/local/mysql directory, where there are a lot of library files under/usr/local/mysql/lib, you can add the following statements in the. BASHRC or. Bash_profile or shell:
Export Ld_library_path=/usr/local/mysql/lib: $LD _library_path
In general, this is a temporary solution that is used when there is no authority or temporary need.
--end--
Error while loading shared Libraries:libseaudit.so.4:cannot open shared object File:error 40