我尝试使用 GDB 在 Eclipse 中调试 C 应用程序,但出现以下错误:
Error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
我尝试安装libncurses5
但它已经安装好了。
我应该更改此包的位置吗?有什么想法吗?
这是我运行之后得到的locate libncurses
。
# locate libncurses
/home/sina/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,any,any,any,libncurses5-dbg,page,1,helpful,,187a06d92ba0b73dd50444293b7cab16
/home/sina/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,ubuntu,quantal,any,libncurses5-dbg,page,1,helpful,,e8f56bcf979e4c966af1cf8fcfb46b89
/home/sina/.cache/software-center/rnrclient/reviews.ubuntu.com,reviews,api,1.0,reviews,filter,en,ubuntu,raring,any,libncurses5-dbg,page,1,helpful,,9e8b7962287c629e99b01502879a8f35
/home/sina/Downloads/libncurses5-dbg_5.9+20130608-1ubuntu1_i386.deb
/lib/x86_64-linux-gnu/libncurses.so.5
/lib/x86_64-linux-gnu/libncurses.so.5.9
/lib/x86_64-linux-gnu/libncursesw.so.5
/lib/x86_64-linux-gnu/libncursesw.so.5.9
/usr/lib/libncurses++_g.a
/usr/lib/libncurses_g.a
/usr/lib/debug/libncurses.so.5
/usr/lib/debug/libncurses.so.5.9
/usr/lib/debug/lib/x86_64-linux-gnu/libncurses.so.5.9
/usr/lib/debug/lib32/libncurses.so.5.9
/usr/lib/debug/lib32/libncursesw.so.5.9
/usr/lib/debug/usr/libx32/libncurses.so.5.9
/usr/lib/debug/usr/libx32/libncursesw.so.5.9
/usr/lib/x86_64-linux-gnu/libncurses++.a
/usr/lib/x86_64-linux-gnu/libncurses.a
/usr/lib/x86_64-linux-gnu/libncurses.so
/usr/share/doc/libncurses5
/usr/share/doc/libncurses5-dbg
/usr/share/doc/libncurses5-dev
/usr/share/doc/libncursesw5
/var/cache/apt/archives/libncurses5-dbg_5.9-10ubuntu4_amd64.deb
/var/lib/dpkg/info/libncurses5-dbg.list
/var/lib/dpkg/info/libncurses5-dbg.md5sums
/var/lib/dpkg/info/libncurses5-dbg.postinst
/var/lib/dpkg/info/libncurses5-dev.list
/var/lib/dpkg/info/libncurses5-dev.md5sums
/var/lib/dpkg/info/libncurses5-dev.postinst
/var/lib/dpkg/info/libncurses5:amd64.list
/var/lib/dpkg/info/libncurses5:amd64.md5sums
/var/lib/dpkg/info/libncurses5:amd64.postinst
/var/lib/dpkg/info/libncurses5:amd64.postrm
/var/lib/dpkg/info/libncurses5:amd64.shlibs
/var/lib/dpkg/info/libncurses5:amd64.symbols
/var/lib/dpkg/info/libncursesw5:amd64.list
/var/lib/dpkg/info/libncursesw5:amd64.md5sums
/var/lib/dpkg/info/libncursesw5:amd64.postinst
/var/lib/dpkg/info/libncursesw5:amd64.postrm
/var/lib/dpkg/info/libncursesw5:amd64.shlibs
/var/lib/dpkg/info/libncursesw5:amd64.symbols
答案1
您需要安装用于调试应用程序的调试符号:
sudo apt-get install libncurses5-dbg
该-dbg
方法是调试您所缺少的符号。