Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LD_LIBRARY_PATH: Cannot open shared object file [duplicate]

Tags:

c++

c

linux

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.

like image 657
nyudebian Avatar asked Dec 05 '22 06:12

nyudebian


2 Answers

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'
like image 107
hyde Avatar answered Dec 08 '22 14:12

hyde


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.

like image 39
Elie Génard Avatar answered Dec 08 '22 13:12

Elie Génard