Environment variable LD_LIBRARY_PATH in Ubuntu

Source: Internet
Author: User
Environment variable LD_LIBRARY_PATH in Ubuntu: (1) run env on the Ubuntu terminal, and the environment variable LD_LIBRARY_PATH is not found (2) open a new terminal and enter the command echo $ LD_LIBRARY_PATH, the result is blank. After adding a directory through export, enter e...
Environment variable LD_LIBRARY_PATH in Ubuntu:
(1) run env on the Ubuntu terminal, and the environment variable LD_LIBRARY_PATH is not found. (2) open a new terminal and enter the echo $ LD_LIBRARY_PATH command. The result is blank.

After adding a directory through export, enter the echo command to display the directory you just added. As follows:

Close the terminal, open a new terminal, and enter the echo $ LD_LIBRARY_PATH command. the screen is blank. (3) edit ~ /. Profile file to add the content: if [-d "$ HOME/lib"]; thenexport LD_LIBRARY_PATH = "/usr/local/netpbm/lib" fi when you log on to tty1 using Ctrl + Alt + F1, you can use echo $ LD_LIBRARY_PATH to view the environment variables. However, on the gnome Terminal, enter the echo command, which is still blank. Environment variable settings are ineffective.
(4) run the sudo vi/etc/environment command to add LD_LIBRARY_PATH = "/usr/local/netpbm/lib" and enter the echo command on the terminal. Run the sudo-I command to access the root user permission. run the echo command to view the set environment variables. Www.2cto.com, how to set the path of the shared library so that the system can search for these libraries. The following methods are used: 1) Place the shared library in the directory/lib or/usr/lib, and use ldconfig to make the addition take effect. 1) add the dynamic library directory to the file/etc/ld. so. conf, and use ldconfig to make the addition take effect even if 2) in the file ~ /Add the if [-d "$ HOME/lib"]; thenexport LD_LIBRARY_PATH = "$ HOME/lib" fi environment variable LD_LIBRARY_PATH in the bashrc file to be used only in bash. Environment variables such as ksh and tcsh cannot be used in other shells.
3) in ~ /. In profile or/etc/environment, edit the environment variable LD_LIBRARY_PATH and edit/etc/X11/Xsession at the same time. in the options file, change the use-ssh-agent to the environment variable LD_LIBRARY_PATH set like no-use-ssh-agent. 4) The-R option specifies the author of the shared library directory lqhbupt.

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: info-contact@alibabacloud.com 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.