1. The application needs to support the implementation of the library
When you create your own releases often need to determine what support shared library file a command needs to ensure that the specified command and reliable operation in a separate system;
Can be realized in the Linux environment by ldd command is executed in a terminal:
ldd / bin / ls. (Note that file command)
You can get / bin / ls command associated shared library files list:
libtermcap.so.2 => /lib/libtermcap.so.2
libc.so.6 => /lib/libc.so.6
/lib/ld-linux.so.2 => /lib/ld-linux.so.2
In the results ldd command to print, "=>" on the left represents the name of the program so you need to connect the shared libraries right represented by the Linux shared library system finds the corresponding shared library specific location in the file system. By default, / etc / ld.so.conf file contains the default shared library search path.
Knowledge Point 2:
If you do not find with ldd command corresponding to the shared library file and its location, two cases may be caused by:
1. The shared library is not installed in the system;
2. Save in the shared library search path outside the /etc/ld.so.conf file listed.
Typically, many open-source programs or libraries would installs itself into the appropriate location / usr / local directory (eg: / usr / local / bin or / usr / local / lib), so that the system itself programs or libraries to distinguish. The /etc/ld.so.conf file in many Linux systems do not contain the default / usr / local / lib. Therefore, often you have already installed shared libraries, but did not find the case of shared libraries. Specific solutions are as follows:
Check /etc/ld.so.conf file, if one is missing / usr / local / lib directory, added to it; Note: After modifying /etc/ld.so.conf file system or installing a new library after that, you need to run a command: ldconfig, this command is used to refresh the system shared library cache that /etc/ld.so.cache file. In order to reduce the shared library system library search time, the shared library system maintains a shared library so the name of the cache file /etc/ld.so.cache. Therefore, after installing a new shared library, be sure to run ldconfig to refresh the cache.