安装带有调试信息的C库
場景說明:RedHat6.4
????在gdb調試boost庫的時候,出現如下的錯誤:
Program received signal SIGSEGV,Segmentation fault.
0x0011c613 in boost::thread::start_thread()()
??from /usr/local/lib/libboost_thread.so.1.49.0
Missing separate debuginfos, use:debuginfo-install glibc-2.12-1.80.el6.i686 libgcc-4.4.6-4.el6.i686 libstdc++-4.4.6-4.el6.i686
原因:
????參考網址:http://yum.baseurl.org/wiki/YumUtils/DebugInfoInstall
一言以蔽之,該指令和yum一樣安裝一些庫文件,但是安裝的庫文件是攜帶gdb的調試。如下是debuginfo提供的源,如果debuginfo-install下載緩慢,可以直接使用迅雷下載:
http://debuginfo.centos.org/6/i386/
解決方案:
1)配置debuginfo的yum源,CentOS可能自帶:
# CentOS-Debug.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. ?You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# All debug packages from all the various CentOS-5 releases
# are merged into a single repo, split by BaseArch
#
# Note: packages in the debuginfo repo are currently not signed
#
[debug]
name=CentOS-6 - Debuginfo
baseurl=http://debuginfo.centos.org/6/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-6
enabled=1
保存文件到/etc/yum.repos.d/目錄下,名字:CentOS-Debug.repo ??
2)測試是否已經安裝了debuginfo-install
debuginfo-install glibc
如果出現下面的問題,表明沒有安裝:
-bash: debuginfo-install: command not found
3)安裝yum-utils,使用命令:
yum install yum-utils
可能安裝的軟件包比較多,可以單獨安裝:
# yum install nss-softokn-debuginfo --nogpgcheck
--nogpgcheck參數選項:忽略簽名的檢查
4)使用debuginfo-install指令,下載上面缺乏的調試庫
參考網址:
http://www.qixing318.com/article/gdb-to-debug-the-error-missing-separate-debuginfos-use-debuginfo-to-install.html
http://blog.csdn.net/testcs_dn/article/details/19565411
? ? ?本文轉自fengyuzaitu 51CTO博客,原文鏈接:http://blog.51cto.com/fengyuzaitu/1403687,如需轉載請自行聯系原作者
? ??
總結
以上是生活随笔為你收集整理的安装带有调试信息的C库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: yum 的奇怪错误
- 下一篇: Ubuntu 11.04解决txt文档中