# Differences between LD\_LIBRARY\_PATH and ROOT\_LIBRARY\_PATH

**URL:** <https://root-forum.cern.ch/t/differences-between-ld-library-path-and-root-library-path/65036>\
**Category:** ROOT\
**Created:** [October 24, 2026, 10:13am UTC](https://root-forum.cern.ch/t/differences-between-ld-library-path-and-root-library-path/65036 "2026-10-24T10:13:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [October 24, 2026, 4:39pm UTC](https://root-forum.cern.ch/t/differences-between-ld-library-path-and-root-library-path/65036/2 "2026-10-24T16:39:42Z")

</div>

ROOT will search for some requested shared library in the “`ROOT_LIBRARY_PATH`”. Still, this variable will NOT be used by the dynamic linker to find and load other shared libraries that your requested shared library depends on. The dynamic linker will only see shared libraries in the “`LD_LIBRARY_PATH`” (and “`RPATH`” and “`RUNPATH`” set in your requested shared library, of course).

See also (try the “[brutal fix](https://root-forum.cern.ch/t/cling-loadlibrary-severely-broken/45924/8)”):

> [@cling::DynamicLibraryManager::loadLibrary severely broken](https://root-forum.cern.ch/t/cling-loadlibrary-severely-broken/45924):
>
> @Axel This is Ubuntu 20.04 / x86\_64 / gcc 9.3.0 and ROOT 6.24/02. I have a bunch of shared libraries which I try to load using: root [0] gSystem-\>AddDynamicPath("/.../VTK-9.0/lib") root [1] gSystem-\>Load("libvtkCommonCore-9.0") cling::DynamicLibraryManager::loadLibrary(): libvtksys-9.0.so.1: cannot open shared object file: No such file or directory (int) -1 However, the “missing” library DOES exist in the same directory, as can be proven by: root [2] gSystem-\>Load("libvtksys-9.0.so.1") (int)…

BTW. You also mention the “`ROOT_LIBRARY_DIR`” variable, but this is a configure/compile-time variable, not a run-time one.

---

_[View the full topic](https://root-forum.cern.ch/t/differences-between-ld-library-path-and-root-library-path/65036)._
