在CentOS7下的gdb中run出现的Missing separate debuginfos, use: debuginfo-install

jackxiang 2015-5-22 17:19 | |
背景:试着在centos7里调试一下c程序,出现,Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.26-17.el7.x86_64 glibc-2.17-78.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.12.2-14.el7.x86_64 libcom_err-1.42.9-7.el7.x86_64 libgcc-4.8.3-9.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libstdc++-4.8.3-9.el7.x86_64 nss-softokn-freebl-3.16.2.3-9.el7.x86_64 openssl-libs-1.0.1e-42.el7.4.x86_64 xz-libs-5.1.2-9alpha.el7.x86_64

问题:
Missing separate debuginfos, use: debuginfo-install glib
解决方法:
在CentOS6.5上用gdb调试时提示Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6.i686

实践如下过程:
uname -rsp
Linux 3.10.0-229.1.2.el7.x86_64 x86_64

http://debuginfo.centos.org/7/x86_64/
(例如本机uname -r 3.10.0-229.1.2 只能选 kernel-debuginfo-3.10.0-229.1.2.el7.x86_64.rpm kernel-debuginfo-common-x86_64-3.10.0-229.1.2.el7.x86_64.rpm


安装debuginfo
rpm -ivh kernel-debuginfo-3.10.0-229.1.2.el7.x86_64.rpm
rpm -ivh kernel-debuginfo-common-x86_64-3.10.0-229.1.2.el7.x86_64.rpm

配置yum源
or 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/ gpgcheck=0
enabled=0
protect=1
priority=1

利用debuginfo-install安装glibc
debuginfo-install glibc

注意事项
安装debuginfo 去http://debuginfo.centos.org寻找和你内核完全匹配的rpm包。


详细:http://jingyan.baidu.com/article/37bce2be1839ca1003f3a253.html

————————————————————————————————————
自己实践如下:
rpm -ihv kernel-debuginfo-common-x86_64-3.10.0-229.1.2.el7.x86_64.rpm
警告:kernel-debuginfo-common-x86_64-3.10.0-229.1.2.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID b6792c39: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:kernel-debuginfo-common-x86_64-3.################################# [100%]

rpm -ihv   kernel-debuginfo-common-x86_64-3.10.0-229.1.2.el7.x86_64.rpm  
警告:kernel-debuginfo-common-x86_64-3.10.0-229.1.2.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID b6792c39: NOKEY
准备中...                          ################################# [100%]
        软件包 kernel-debuginfo-common-x86_64-3.10.0-229.1.2.el7.x86_64 已经安装

再安装:
debuginfo-install cyrus-sasl-lib-2.1.26-17.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.12.2-14.el7.x86_64 libcom_err-1.42.9-7.el7.x86_64 libgcc-4.8.3-9.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libstdc++-4.8.3-9.el7.x86_64 openssl-libs-1.0.1e-42.el7.4.x86_64 xz-libs-5.1.2-9alpha.el7.x86_64

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://jackxiang.com/post/8073/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!


最后编辑: jackxiang 编辑于2015-5-25 15:07
评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]