LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2015, 10:58 AM   #1
Selecta
LQ Newbie
 
Registered: Sep 2015
Distribution: Ubuntu 14.04
Posts: 19

Rep: Reputation: Disabled
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!
 
Old 09-15-2015, 12:34 PM   #2
Selecta
LQ Newbie
 
Registered: Sep 2015
Distribution: Ubuntu 14.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libgda-4.0.so.4: cannot open shared object file mahesh1234 Linux - Newbie 2 10-22-2013 11:06 PM
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: vswapnasr@gmail.com Linux - Software 1 05-04-2013 06:49 AM
top: error while loading shared libraries: libproc.so.2.0.6: cannot open shared objec ramesh_india2020 Linux - Server 1 07-29-2010 12:52 PM
error while loading shared libraries: libstdc++.so.5: cannot open shared object file PaulyWally Debian 2 10-18-2008 05:59 PM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration