本人使用rhel 6 GDB 调试代码时,出现如下错误:linux
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.166.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libgcc-4.4.7-16.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64 libstdc++-4.4.7-16.el6.x86_64 openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64c++
在网上搜了大量的资料,,对centos 的相似问题解决方法比较多,我参考百度经验采起如下方法:centos
选kernel-debuginfo-2.6.32-573.el6.x86_64.rpm kernel-debuginfo-common-2.6.32-573.el6.x86_64.rpmthis
方法:只装这俩个包,,能够下载下来放共享目录,也能够在配置好ftp后设置yum的获取地址为:baseurl=http://debuginfo.centos.org/6/$basearch/url
kernel-debuginfo-common-xxxxxspa
kernel-debuginfo-xxxxdebug
rpm -ivh kernel-debuginfo-common-xxxxx调试
rpm -ivh kernel-debuginfo-xxxxssl
也能够用这个命令安装 rpm -ivh kernel-debuginfo*.rpmopenssl
For this to work, you need to have the debuginfo repository defined. For CentOS 5, put the following in /etc/yum.repos.d/CentOS-Base-debuginfo.repo:
[base-debuginfo] name=CentOS-$releasever - DebugInfo
baseurl=http://debuginfo.centos.org/$releasever/$basearch/ 此处的根据须要,$releasever 要改成本身所需的版本号,好比个人就是 6
gpgcheck=0
enabled=0
protect=1
priority=1
注意要确保外网连通,,,,能够使用centos 的rpm包
yum --nogpgcheck --enablerepo=debug install glibc-debuginfo 配好仓库之后能够装debuginfo (!!!详细状况能够见下文,redhat的未注册解决办法)
若是直接执行debuginfo-install命令的话会出现nss-softokn-debuginfoXXXXXXX not signed ,就是没有签名,不能安装,因此采用--nogpgcheck选项 忽略签名的检查
debuginfo-install glibc + 版本号
若是没有debuginfo-install命令的话:
yum install yum-utils