I have copied a executable file to another machine, i have copied its dependent library to "/lib" directory too, but when i run that file, it still cannot find that library. when i set
LD_LIBRARY_PATH=/lib
it works properly。
Is the directory "/lib" a default path to find library? why it doesn't work until I set LD_LIBRARY_PATH ? and is it totally unnecessary to set LD_LIBRARY_PATH to "/lib" which should be the DEFAULT path??
You forgot to run ldconfig
to update the library location cache.