Error loading shared library: libGarf3d.so

Hello root user,

I have a program . It is compiled without any problem. while running i get the following error.

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


file libGraf3d.so is related to root. It is there in my system. I read on some other website that this problem can arise if you have installed a program many times and there are many versions of such files on system. Then operating system can not decide which file to link to during runtime.

i have many versions of this file.

./usr/local/lib/root/libGraf3d.so
./usr/lib/x86_64-linux-gnu/root5.34/libGraf3d.so
./usr/lib/x86_64-linux-gnu/root5.34/libGraf3d.so.5.34
./usr/lib/x86_64-linux-gnu/root5.34/libGraf3d.so.5
./usr/lib/x86_64-linux-gnu/libGraf3d.so.5.34

How can i remove these different versions without damaging my system ?
or

There is something else causing the problem ?

Any one Help Please .

Does your LD_LIBRARY_PATH environment variable point to the place where this library sits ?

Hi couet,

Thanks for the reply. :slight_smile:

LD_LIBRARY_PATH did not include the path of file. Now I have included this in my bashrc. It works.

:slight_smile: :smiley:

Can you please tell a method to remove other versions of this file ? Actually i have mistakenly installed two versions of root ( 5.34 and 6.04 ). I would like to remove one of it . do you know a clean method ?

Varun

Simply remove (rm) those you do not need.