场景说明: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
原因:
参考网址:
一言以蔽之,该指令和yum一样安装一些库文件,但是安装的库文件是携带gdb的调试。如下是debuginfo提供的源,如果debuginfo-install下载缓慢,可以直接使用迅雷下载:
解决方案:
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指令,下载上面缺乏的调试库
参考网址: