Error while loading shared libraries

Dear Rooters,
I am trying to install root ver 4.00.04 from source in my PC having RH 9.0 gcc 3.2.2. I have installed the program in /usr/local with root previledges. Now when I try to run “root” both as su or as user, the basic root window opens but doesn’t initiate the program. It hangs showing an error message as :-

[san@localhost san]$ root
/usr/local/bin/root.exe: error while loading shared libraries:
cannot open shared object file: No such file or directory

At the end I have to kill the process to exit.

Kindly help me to find out what went wrong.
Wishing you all a Happy New Year.


Make suire the the directory where is physically located is properly added to the LD_LIBRARY_PATH.

You may also have forgotten to set the --prefix in your configure step.

Thank you Philippe,
adding LD_LIBRARY_PATH=/usr/local/lib/root/:/lib/ in .bashrc solved the problem.


Sorry Rooters,
Adding the path in .bashrc does not solve the problem. You have to add the line /usr/local/lib/root in /etc/ and then run ldconfig as su to get root start up.