rehat 出現GDB debuginfo-install 問題處理

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

  1. 先查看本機的內核版本號:uname -r      本機爲:2.6.32-573.el6.x86_64
  2. 安裝debuginfo 去http://debuginfo.centos.org尋找和你內核徹底匹配:           本機內核是2.6.32-573的         在網址  http://debuginfo.centos.org/6/x86_64/   下
  3. 選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

     

  4. 安裝debuginfo              注意:要先安裝common包  

    rpm -ivh kernel-debuginfo-common-xxxxx調試

    rpm -ivh kernel-debuginfo-xxxxssl

     

    也能夠用這個命令安裝   rpm -ivh kernel-debuginfo*.rpmopenssl

  5. 配置yum源(安裝完後發現yum源目錄下不會生成相似   *-debuginfo-*.repo )

    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選項 忽略簽名的檢查        

  6. 利用debuginfo-install安裝glibc

    debuginfo-install glibc + 版本號

     

    若是沒有debuginfo-install命令的話:

    yum install  yum-utils  

相關文章
相關標籤/搜索