Error while loading shared libraries: libCore.so: cannot open shared object file: No such file or directory


Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

_ROOT Version: 6.30/06
_Platform: Ubuntu20.04
_Compiler: g++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0

Okay so I know there are some similar topics to this. I haven’t been able to figure out how any of the solutions therein are applicable.

When I run any code that uses ROOT, I get error while loading shared libraries: libCore.so: cannot open shared object file: No such file or directory

I am working on a cluster and loading the module that they have installed. Here is the end of my .bashrc


export ROOTSYS=ROOT_SPACK_ROOT
export PATH=$PATH:$ROOTSYS/bin
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH:$/home/dkennedy_umass_edu/Software/VENV/venv1/lib/python3.11/site-packages
export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD_LIBRARY_PATH
# export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ROOTSYS/lib
export LD_LIBRARY_PATH=/home/dkennedy_umass_edu/Software/MG5_aMC_v3_5_6/Delphes:/home/dkennedy_umass_edu/Software/MG5_aMC_v3_5_6/ExRootAnalysis/ExRootAnalysis:/home/dkennedy_umass_edu/Software/MG5_aMC_v3_5_6/ExRootAnalysis:$LD_LIBRARY_PATH
export ROOT_INCLUDE_PATH=/home/dkennedy_umass_edu/Software/MG5_aMC_v3_5_6/Delphes/external:/home/dkennedy_umass_edu/Software/MG5_aMC_v3_5_6/Delphes/classes:$ROOT_INCLUDE_PATH
export PYTHIA8DATA=/home/dkennedy_umass_edu/Software/MG5_aMC_v3_5_6/HEPTools/pythia8/share/Pythia8/xmldoc/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dkennedy_umass_edu/Software/MG5_aMC_v3_5_6/HEPTools/lhapdf6_py3/lib
# export LD_LIBRARY_PATH=/home/dysontravis/MG5_aMC_v3_5_4/Delphes:/home/dysontravis/MG5_aMC_v3_5_4/ExRootAnalysis:$LD_LIBRARY_PATH
# exporo ROOT_INCLUDE_PATH=/home/dysontravis/MG5_aMC_v3_5_0/Delphes/external:/home/dysontravis/MG5_aMC_v3_5_0/Delphes/classes:/home/dysontravis/MG5_aMC_v3_5_0/ExRootAnalysis/ExRootAnalysis:$ROOT_INCLUDE_PATH
#export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD_LIBRARY_PATH
#export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH
# source /home/dkennedy_umass_edu/ROOT/build/bin/thisroot.sh
source /home/dkennedy_umass_edu/Software/VENV/venv1/bin/activate

running ls $ROOTSYS/lib gives a single directory root within which libCore.so exists.

(venv1) dkennedy_umass_edu@login1:~$ ls $ROOTSYS/lib/root/libCore.*
/modules/spack/packages/linux-ubuntu24.04-x86_64_v3/gcc-13.2.0/root-6.30.06-thrfpcvvbuqgtwvd3qvuythhw4jppu57/lib/root/libCore.rootmap
/modules/spack/packages/linux-ubuntu24.04-x86_64_v3/gcc-13.2.0/root-6.30.06-thrfpcvvbuqgtwvd3qvuythhw4jppu57/lib/root/libCore.so
/modules/spack/packages/linux-ubuntu24.04-x86_64_v3/gcc-13.2.0/root-6.30.06-thrfpcvvbuqgtwvd3qvuythhw4jppu57/lib/root/libCore.so.6.30
/modules/spack/packages/linux-ubuntu24.04-x86_64_v3/gcc-13.2.0/root-6.30.06-thrfpcvvbuqgtwvd3qvuythhw4jppu57/lib/root/libCore.so.6.30.06
(venv1) dkennedy_umass_edu@login1:~$

I can run root just fine from anywhere.
The topic that is most similar to mine seems to be this: [Solved] libCore.so: cannot open shared object file: No such
but since I’m working on a cluster, /etc/ is not something I can touch. I have asked the cluster if that is something someone can help with. However, I wanted to post here to see if there’s another solution someone can point to.

As to the other topics with a similar error:
This link: libCore.so.6.30: cannot open shared object file: No such file or directory
doesn’t have a solution
The solution in this one: Error loading shared libraries, cannot open object file
seems to be something I already have
Likewise, this one Error while loading shared libraries - libCore.so - #14 by papagaj seems to be not applicable.

I found the issue. I had some outdated files that were pointing to the wrong PATHs

Thanks for sharing the solution.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.