Error while loading shared libraries

Hi all,
I try to compile and run the example $ROOTSYS/test/Event. On 5.00.08 I succeed, and it runs. On 4.04.02 and 4.00.08 it compiles perfectly, and thenwhen I try to run it, it says:

./Event: error while loading shared libraries: libEvent.so: cannot open shared object file: No such file or directory

but the library is there!

The error output looks like:

[ivan@heph1 ~/local_root]$ cp $ROOTSYS/test/Event* . [ivan@heph1 ~/local_root]$ cp $ROOTSYS/test/Main* . [ivan@heph1 ~/local_root]$ cp $ROOTSYS/test/Make* . [ivan@heph1 ~/local_root]$ make Event g++ -O -Wall -fPIC -pthread -I/home/software/physics/root/include -c Event.cxx Generating dictionary EventDict.cxx... g++ -O -Wall -fPIC -pthread -I/home/software/physics/root/include -c EventDict.cxx g++ -shared -O Event.o EventDict.o -o libEvent.so libEvent.so done g++ -O -Wall -fPIC -pthread -I/home/software/physics/root/include -c MainEvent.cxx g++ -O MainEvent.o libEvent.so -L/home/software/physics/root/lib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -pthread -lm -ldl -rdynamic \ -o Event Event done [ivan@heph1 ~/local_root]$ ./Event ./Event: error while loading shared libraries: libEvent.so: cannot open shared object file: No such file or directory

Hi.

Copy libEvent.so into your $ROOTSYS/lib ???

Should not that be working without copying to $ROOTSYS/lib? Moreover, I cannot write thereā€¦

It works (as you said :slight_smile: ) with the newer versions :slight_smile:

But it can work with your version - simple workaround is to add path where your libEvent.so is to you LD_LIBRARY_PATH enviroment variable :slight_smile: