5

I have a problem with environment variable LD_LIBRARY_PATH.

When I run my bin, I get this error message:

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

I added my library to LD_LIBRARY_PATH, like:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'/home/nyu-debian/Desktop/Stage-Kaliterre/Project/Projects/AllJoyn/core/alljoyn/build/linux/x86_64/release/dist/cpp/lib/liballjoyn.so'

I also tried:

  • put -L option - not working.
  • change export by env with the ./bignum in the end - not working.

All my attempts didn't work... what else can I try?

I'm on Debian Wheezy. This command work last weekend, but now it doesn't work anymore.

Stan
  • 8,710
  • 2
  • 29
  • 31
nyudebian
  • 63
  • 1
  • 1
  • 5
  • Have a look at man ldconfig –  May 13 '14 at 07:49
  • @alk I don't think that's a good duplicate. It does not tell what is wrong with the `LD_LIBRARY_PATH` presented in this question. There probably is a duplicate which covers the problem (of specifying *file* instead of directory), but that's not it. – hyde May 13 '14 at 11:39
  • The real problem was really stupid... Error: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'/lib/ <==== Soluation: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'/lib <==== Sorry for this useless post and thanks for your answers. :) – nyudebian May 14 '14 at 07:33

2 Answers2

9

LD_LIBRARY_PATH is a path. Therefore, try this, without the library file name:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'/home/nyu-debian/Desktop/Stage-Kaliterre/Project/Projects/AllJoyn/core/alljoyn/build/linux/x86_64/release/dist/cpp/lib'
hyde
  • 60,639
  • 21
  • 115
  • 176
7

Try with this :

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/nyu-debian/Desktop/Stage-Kaliterre/Project/Projects/AllJoyn/core/alljoyn/build/linux/x86_64/release/dist/cpp/lib 

Without liballjoyn.so because LD_LIBRARY_PATH is a path.

Elie Génard
  • 1,673
  • 3
  • 21
  • 34