Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to debug a C application with Eclipse using GDB but I got the following error:

Error while loading shared libraries: cannot open shared object file: No such file or directory

I tried to install libncurses5 but it's already installed.

Should I change the location of this package? any idea?

This is what I got after running locate libncurses.

# locate libncurses
share|improve this question
what does 'locate libncurses' return on the command line? – kervin Nov 17 '13 at 2:57
Are you trying to debug a 32-bit application? – Braiam Nov 21 '13 at 17:49

You need to install the debugging symbols for debugging applications:

sudo apt-get install libncurses5-dbg

The -dbg means debug which is the symbols your are lacking.

share|improve this answer
I did install that package...still get the same error. That's truly bizarre! None of the target programs use the ncurses library and in fact it is not in the target file system. I have no clue why the debugger would be trying to load libncurses. – Sina Nov 21 '13 at 6:30
gdb itself depends on libncurses5 - it's probably not trying to load it for your target (and probably doesn't need libncurses5-dev or libncurses5-dbg). You could try ldd $(which gdb) to see if anything looks broken - or purge and reinstall gdb itself maybe? – steeldriver Nov 21 '13 at 17:30
root@sina-linux:~# ldd $(which gdb) => (0x00007fff609fe000) => /lib/x86_64-linux-gnu/ (0x00007f84ae320000) => /lib/x86_64-linux-gnu/ (0x00007f84ae11c000) => /lib/x86_64-linux-gnu/ (0x00007f84adefa000) => /lib/x86_64-linux-gnu/ (0x00007f84adcd2000) => /lib/x86_64-linux-gnu/ (0x00007f84adabb000) => /lib/x86_64-linux-gnu/ (0x00007f84ad7b5000) => /lib/x86_64-linux-gnu/ (0x00007f84ad598000) – Sina Nov 22 '13 at 3:30 => /usr/lib/x86_64-linux-gnu/ (0x00007f84ad069000) => /lib/x86_64-linux-gnu/ (0x00007f84ace3f000) => /lib/x86_64-linux-gnu/ (0x00007f84aca76000) /lib64/ (0x00007f84ae57d000) => /lib/x86_64-linux-gnu/ (0x00007f84ac873000) – Sina Nov 22 '13 at 3:30
No, none. You should edit your question instead for adding more information. – Braiam Nov 22 '13 at 4:32

protected by Community Oct 31 '14 at 10:42

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.