Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to do this:

On linux, we have to find a few dynamic libraries which are not on a standard location. We have to set $LD_LIBRARY_PATH to /path/to/sdk/lib

How can I do that in Ubuntu 10.10?

share|improve this question
up vote 19 down vote accepted

To define this variable, simply use (on the shell prompt):

export LD_LIBRARY_PATH="/path/to/sdk/lib"

To make it permanent, you can edit the ldconfig files. First, create a new file such as:

sudo vi /etc/

Second, add the path in the created file


Finally, run ldconfig to update the cache.

sudo ldconfig
share|improve this answer
Are the quotes necessary for LD_LIBRARY_PATH? – SAFX Apr 2 '13 at 4:29

In bash, assign it before the executable to be run.

LD_LIBRARY_PATH=/path/to/sdk/lib ./somedevtool
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.