0

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??

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
Don Hall
  • 107
  • 1
  • 10

1 Answers1

1

You forgot to run ldconfig to update the library location cache.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358