本人使用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