LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   error while loading shared libraries (https://www.linuxquestions.org/questions/linux-newbie-8/error-while-loading-shared-libraries-4175553569/)

Selecta 09-15-2015 10:58 AM

error while loading shared libraries
 
I am running the following command:

Quote:

sudo chroot ./ nethack/nethack
Command returns this error:

Quote:

nethack/nethack: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Performed ldd nethack with the following results:

Quote:

linux-vdso.so.1 => (0x00007ffd191ea000)
libncurses.so.5 => /lib/x86_64-linux-gnu/libncurses.so.5 (0x00007f39775fa000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f39773d1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f397700c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3976e08000)
/lib64/ld-linux-x86-64.so.2 (0x00007f397781d000)
I checked in /lib/x86_64-linux-gnu and the libncurses.so.5 exists.There is also a libncurses.so.5.9.

Performed sudo ldconfig -v with the following results (relevant section):

Quote:

libncurses.so.5 -> libncurses.so.5.9
Also tried to set my $LD_LIBRARY_PATH but I'm not sure if I did it right or if it matters.

Any other steps I could try would be fantastic.

Thank you!

Selecta 09-15-2015 12:34 PM

I think I got it. The library (x86_64-linux-gnu) was in three different places... /usr, /usr/lib and /pathtomyapp/lib. The files in the 3rd one didn't match the other two so I renamed it out of the way and copied the directory (x86_64-linux-gnu) from /lib to /pathtomyapp/lib and then was able to run the command without the shared libraries error.


All times are GMT -5. The time now is 05:29 AM.