Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.47.el6_2.9.i686 libgcc-4.4.6-3.el6.i686 libstdc++-4.4.6-3.el6.i686

后端 未结 3 1633
粉色の甜心
粉色の甜心 2020-12-02 07:47

CentOS 6.2 + GNU gdb (GDB) Red Hat Enterprise Linux (7.2-50.el6)

When I debug a simple c++ code with GDB, I saw the following warning:

Missing separa         


        
相关标签:
3条回答
  • 2020-12-02 08:10

    The order of the accepted answer doesn't work for me.

    I followed some tips in the comments and here's what I tried and succceded in my fresh install CentOS 7.2

    1. From @lkraav's comment, I followed this wiki https://wiki.centos.org/AdditionalResources/Repositories/DebugInfo and create a new file.

    The following could be appended to /etc/yum.repos.d/CentOS-Base.repo or a new file created such as /etc/yum.repos.d/CentOS-Debug.repo.

    1. I pasted those contents from the wiki into the new /etc/yum.repos.d/CentOS-Debug.repo file but edit enabled=0 line to enabled=1

    2. I debuginfo-install everything showed in the gdb warning and succeeded installing.

    0 讨论(0)
  • 2020-12-02 08:14

    In case, someone else encounters the same issue,

    I had updated the glibc and somehow the old ldconfig had been flushed was facing this error while running the application

    error while loading shared libraries: libjson-c.so.2: cannot open shared object file: No such file or directory

    Even after setting the LD_LIBRARY_PATH it didn't work:

    LD_LIBRARY_PATH=/usr/local/lib
    export LD_LIBRARY_PATH
    

    Finally the commands below came to the rescue.

    // Add you library path here.
    echo /usr/local/lib >> /etc/ld.so.conf
    
    // And then Run ldconfig to reflect the path
    ldconfig
    
    0 讨论(0)
  • 2020-12-02 08:16

    debuginfo-install is a command of yum-utils, so

    1. yum install yum-utils
    2. debuginfo-install glibc
    3. if the warning's still there, edit /etc/yum.repos.d/CentOS-Debuginfo.repo, set enabled=1
    0 讨论(0)
提交回复
热议问题