【linux gdb】Missing separate debuginfos, use: debuginfo-install

本文介绍了如何在使用gdb调试Core文件时遇到Missingseparateddebuginfos问题,包括修改yum配置、安装缺失的debuginfo以及处理因python版本过高导致的SyntaxError,最后提到将debuginfo-install脚本的python版本改为2.7以确保兼容性。
摘要由CSDN通过智能技术生成

使用gdb调试core文件时,出现以下信息:
Missing separate debuginfos, use: debuginfo-install glibc-2.17-326.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 libstdc+±4.8.5-44.el7.x86_64

  1. 修改/etc/yum.repos.d/CentOS-Debuginfo.repo文件中的enable为1,若没有该文件,
    [base-debuginfo]
    name=CentOS-$releasever - DebugInfo
    baseurl=http://debuginfo.centos.org/$releasever/$basearch/
    gpgcheck=0
    enabled=0
    protect=1
    priority=1
    
  2. yum install glibc yum-utils
  3. debuginfo-install glibc-2.17-326.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 libstdc+±4.8.5-44.el7.x86_64

如果第三步出现以下情况,大概率python版本过高导致的,更改debuginfo-install使用的python版本为2.7

[root@localhost build]# debuginfo-install glibc-2.17-326.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 libstdc++-4.8.5-44.el7.x86_64
  File "/usr/bin/debuginfo-install", line 58
    except yum.Errors.YumBaseError, e:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized

修改debuginfo-install使用的python版本为2.*版本,如:

vi /usr/bin/debuginfo-install

修改第一行为

#!/usr/bin/python2.7
  • 11
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值