# Changing LD\_LIBRARY\_PATH in root session

**URL:** <https://root-forum.cern.ch/t/changing-ld-library-path-in-root-session/4820>\
**Category:** ROOT\
**Created:** [May 23, 2007, 12:10pm UTC](https://root-forum.cern.ch/t/changing-ld-library-path-in-root-session/4820 "2007-05-23T12:10:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stadie](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/dc4da7/32.png) [@stadie](https://root-forum.cern.ch/u/stadie)\
**Post date:** [May 23, 2007, 12:10pm UTC](https://root-forum.cern.ch/t/changing-ld-library-path-in-root-session/4820/1 "2007-05-23T12:10:04Z")

</div>

Dear all,

I am playing around with the CMS software and PROOF. For this, I would like to setup the necessary environment from within the ROOT session( via SETUP.C).  
However, somehow I fail to set the LD\_LIBRARY\_PATH.  
I tried:  
root [0] gSystem-\>Setenv(“LD\_LIBRARY\_PATH”,"/rdata2/…");  
root [1] gSystem-\>SetDynamicPath(".:/afs/desy.de/…");  
root [2] gSystem-\>Load(“libFWCoreFWLite”);  
dlopen error: libboost\_regex-gcc-mt-1\_33\_1.so.1.33.1: cannot open shared object file: No such file or directory  
Load Error: Failed to load Dynamic link library /afs/desy.de/group/cms/sw/slc3\_ia32\_gcc323/cms/cmssw/CMSSW\_1\_3\_1/lib/slc3\_ia32\_gcc323/libFWCoreFWLite.so  
\*\*\* Interpreter error recovered \*\*\*

Running “.! ldd …” on the libFWCoreFWLite from within root shows no unknown libraries, so the dlopen call seems not to use the current LD\_LIBRARY\_PATH.

The whole operation works if I set the LD\_LIBRARY\_PATH before starting ROOT.  
Is there anything else I have to set besides this env variable and DynamicPath?

Thanks a lot in advance,  
Hartmut.
