gdb调试时的问题Missing separate debuginfos, use: debuginfo-install glibc-XXX

转载自:http://blog.csdn.net/testcs_dn/article/details/19565411 

在CentOS6.4下使用gdb进行调试的时候,

使用bt(breaktrace)命令时,会弹出如下的提示:

头一天提示:

Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6.i686

问题没解决,第二天提示:

Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6.i686

但是直接按提示使用 debuginfo-install glibc-2.12-1.132.el6.i686 去安装的时候会报如下的信息:

Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: mirrors.yun-idc.com
 * extras: mirrors.yun-idc.com
 * updates: mirrors.yun-idc.com
Checking for new repos for mirrors
No debuginfo packages available to install

使用yum来进行安装:

 sudo yum --nogpgcheck --enablerepo=debug install glibc-debuginfo
却提示:Error Downloading Packages:
  glibc-debuginfo-common-2.12-1.132.el6.i686: failure: glibc-debuginfo-common-2.12-1.132.el6.i686.rpm from debug: [Errno 256] No more mirrors to try.
使用yum install glibc安装,发现只是安装了一些基本库,不包含 glibc-debuginfo
后来搜索发现需要先修改“/etc/yum.repos.d/CentOS-Debuginfo.repo”文件的enable=1
文件内容如下:
   
   
   
   
[plain] view plain copy
  1. # CentOS-Debug.repo  
  2. #  
  3. # The mirror system uses the connecting IP address of the client and the  
  4. # update status of each mirror to pick mirrors that are updated to and  
  5. # geographically close to the client.  You should use this for CentOS updates  
  6. # unless you are manually picking other mirrors.  
  7. #  
  8.   
  9. # All debug packages from all the various CentOS-5 releases  
  10. # are merged into a single repo, split by BaseArch  
  11. #  
  12. # Note: packages in the debuginfo repo are currently not signed  
  13. #  
  14.   
  15. [debug]  
  16. name=CentOS-6 - Debuginfo  
  17. baseurl=http://debuginfo.centos.org/6/$basearch/  
  18. gpgcheck=1  
  19. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-6  
  20. enabled=1  
保存之后,使用 debuginfo-install glibc-2.12-1.132.el6.i686 安装,输出如下:

   
   
   
   
[plain] view plain copy
  1. Loaded plugins: fastestmirror, refresh-packagekit  
  2. Loading mirror speeds from cached hostfile  
  3.  * base: mirrors.yun-idc.com  
  4.  * extras: mirrors.yun-idc.com  
  5.  * updates: mirrors.yun-idc.com  
  6. debug                                                                                                                                 | 2.5 kB     00:00       
  7. Checking for new repos for mirrors  
  8. --> Running transaction check  
  9. ---> Package glibc-debuginfo.i686 0:2.12-1.132.el6 will be installed  
  10. --> Processing Dependency: glibc-debuginfo-common = 2.12-1.132.el6 for package: glibc-debuginfo-2.12-1.132.el6.i686  
  11. ---> Package nss-softokn-debuginfo.i686 0:3.12.9-11.el6 will be installed  
  12. ---> Package yum-plugin-auto-update-debug-info.noarch 0:1.1.30-17.el6_5 will be installed  
  13. --> Running transaction check  
  14. ---> Package glibc-debuginfo-common.i686 0:2.12-1.132.el6 will be installed  
  15. --> Finished Dependency Resolution  
  16.   
  17. Dependencies Resolved  
  18.   
  19. =============================================================================================================================================================  
  20.  Package                                                Arch                        Version                               Repository                    Size  
  21. =============================================================================================================================================================  
  22. Installing:  
  23.  glibc-debuginfo                                        i686                        2.12-1.132.el6                        debug                         10 M  
  24.  nss-softokn-debuginfo                                  i686                        3.12.9-11.el6                         debug                        1.0 M  
  25.  yum-plugin-auto-update-debug-info                      noarch                      1.1.30-17.el6_5                       updates                       22 k  
  26. Installing for dependencies:  
  27.  glibc-debuginfo-common                                 i686                        2.12-1.132.el6                        debug                        7.5 M  
  28.   
  29. Transaction Summary  
  30. =============================================================================================================================================================  
  31. Install       4 Package(s)  
  32.   
  33. Total size: 19 M  
  34. Total download size: 8.6 M  
  35. Installed size: 93 M  
  36. Is this ok [y/N]: y  
  37. Downloading Packages:  
  38. (1/3): glibc-debuginfo-common-2.12-1.132.el6.i686.rpm                                                                                 | 7.5 MB     12:03       
  39. (2/3): nss-softokn-debuginfo-3.12.9-11.el6.i686.rpm                                                                                   | 1.0 MB     01:56       
  40. (3/3): yum-plugin-auto-update-debug-info-1.1.30-17.el6_5.noarch.rpm                                                                   |  22 kB     00:00       
  41. -------------------------------------------------------------------------------------------------------------------------------------------------------------  
  42. Total                                                                                                                         10 kB/s | 8.6 MB     14:10       
  43. Running rpm_check_debug  
  44. Running Transaction Test  
  45. Transaction Test Succeeded  
  46. Running Transaction  
  47.   Installing : glibc-debuginfo-common-2.12-1.132.el6.i686                                                                                                1/4   
  48.   Installing : glibc-debuginfo-2.12-1.132.el6.i686                                                                                                       2/4   
  49.   Installing : yum-plugin-auto-update-debug-info-1.1.30-17.el6_5.noarch                                                                                  3/4   
  50.   Installing : nss-softokn-debuginfo-3.12.9-11.el6.i686                                                                                                  4/4   
  51.   Verifying  : glibc-debuginfo-common-2.12-1.132.el6.i686                                                                                                1/4   
  52.   Verifying  : nss-softokn-debuginfo-3.12.9-11.el6.i686                                                                                                  2/4   
  53.   Verifying  : glibc-debuginfo-2.12-1.132.el6.i686                                                                                                       3/4   
  54.   Verifying  : yum-plugin-auto-update-debug-info-1.1.30-17.el6_5.noarch                                                                                  4/4   
  55.   
  56. Installed:  
  57.   glibc-debuginfo.i686 0:2.12-1.132.el6      nss-softokn-debuginfo.i686 0:3.12.9-11.el6      yum-plugin-auto-update-debug-info.noarch 0:1.1.30-17.el6_5       
  58.   
  59. Dependency Installed:  
  60.   glibc-debuginfo-common.i686 0:2.12-1.132.el6                                                                                                                 
  61.   
  62. Complete!  
OK,问题解决。
第二次安装总结:
1、需要先修改“/etc/yum.repos.d/CentOS-Debuginfo.repo”文件的enable=1;
2、使用 sudo yum install glibc 安装;
3、使用 debuginfo-install glibc-2.12-1.132.el6.i686 安装。
测试,安装成功。

你可能感兴趣的:(gdb调试时的问题Missing separate debuginfos, use: debuginfo-install glibc-XXX)