rehat 出現GDB debuginfo-install 問題處理


本人使用rhel 6    GDB 調試代碼時,出現以下錯誤:

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_64

 

在網上搜了大量的資料,,對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.rpm

    方法:只裝這倆個包,,可以下載下來放共享目錄,也可以在配置好ftp后設置yum的獲取地址為:baseurl=http://debuginfo.centos.org/6/$basearch/

    kernel-debuginfo-common-xxxxx

    kernel-debuginfo-xxxx

     

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

    rpm -ivh kernel-debuginfo-common-xxxxx

    rpm -ivh kernel-debuginfo-xxxx

     

    也可以用這個命令安裝   rpm -ivh kernel-debuginfo*.rpm

  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  

     

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM