在CentOS6.3使用gdb进行调试的时候,会弹出如标题的提示。但是直接按提示使用debuginfo-install去安装的时候会报如下的错误:
Could not find debuginfo pkg for dependency package glibc-2.12-1.47.el6.x86_64
Could not find debuginfo pkg for dependency package glibc-2.12-1.47.el6.x86_64
Could not find debuginfo pkg for dependency package glibc-2.12-1.47.el6.x86_64
Could not find debuginfo pkg for dependency package glibc-2.12-1.47.el6.x86_64
查看一下debuginfo-install的脚本,那现该脚本会打开一个以-debuginfo结尾的仓库,但查看/etc/yum.repos.d/CentOS-Debuginfo.repo文件,debuginfo的仓库命名为debug的。
实际上可以使用yum来进行安装:
yum --nogpgcheck --enablerepo=debug install glibc-debuginfo
问题解决!