| | 61 | Environment variables are usually defined in the profile file, for example {{{.profile}}} defined in the user directory for sh/bash users, and in {{{/etc/profile}}}. You should probably update this file in order to set permanently your custom environment. Alternatively you can set the variables in a script or in a particular shell session. |
| | 62 | |
| | 63 | Remember to export the variables to the child process, e.g. using the {{{export}}} command. Read the fine documentation of your shell for more detailed information. |
| | 64 | |
| | 65 | == LD_LIBRARY_PATH and ldconfig == |
| | 66 | |
| | 67 | When you link a library depending on other libraries, the tools will look for the libraries to link in a list of standard paths (typically, {{{/usr/lib}}}, and in other paths which are set in the system. Some systems rely on the {{{LD_LIBRARY_PATH}}} library. Alternatively you may set the global path through the {{{ldconfig}}} utility, which is done editing the {{{/etc/ld.so.conf}}} system configuration file. |
| | 68 | |
| | 69 | Note that on some systems the {{{LD_LIBRARY_PATH}}} variable defined in the shell profile is reset for security reasons (e.g. see https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/366728), so you may need to reset it per-session or per-script. |
| | 70 | |