Error loading shared library:

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: cannot open shared object file: No such file or directory

file 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.


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

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 ?


Simply remove (rm) those you do not need.