Analysis of Linux LD_LIBRARY_PATH

Source: Internet
Author: User

Analysis of Linux LD_LIBRARY_PATH (I) Historical Background nowadays, most of the software comes with a shared library, or for security reasons, or based on commercial considerations such as: ORACLE: $ ORACLE_HOME/lib MySQL: $ HOME/mysql/lib is attached to the oracle user. in bash_profile, set [plain] export LD_LIBRARY_PATH = $ ORACLE_HOME/lib export LD_LIBRARY_PATH = $ scheme:/usr/lib:/usr/X11R6/lib export LD_LIBRARY_PATH = $ scheme: $ ORACLE_HOME/jdk/jre/lib/i386 export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ ORACLE_HOME/jdk/jre/lib/i386/server export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ ORACLE_HOME/rdbms/lib (2) concepts ① the following concepts are similar to those of shared libraries, dynamic link libraries, and ,. so file ② ld. so is also called: the significance of the shared library loader (3) to tell ld. so where can I find someone's shared library? (4. so file management and loading by ld. so is responsible for finding the APP in the standard path/lib or/usr/lib. so, but for non-standard paths: Linux adds private paths to/etc/ld. so. conf, run ldconfig to generate ld. so. cache, ld. so will find this cache UNIX style is to use LD_LIBRARY_PATH to process non-standard paths. so File Search priority is as follows (Linux): ① LD_LIBRARY_PATH environment variable specifies directory ②/etc/ld. so. conf specifies the directory ③ standard path first/usr/lib and then/lib (v) common error: error while loading shared libraries: ooxx. so.0: cannot open shared object file: no such file or directory how ooxx is named here. If you are interested, please refer to the open link (6) general solution (1) to cp these libraries to/usr/lib or/lib. and then ldconfig has a case: click Open link ②/etc/ld. so. conf, then ldconfig ③ LD_LIBRARY_PATH (this variable has been criticized)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.