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
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
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
.
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
I debuginfo-install
everything showed in the gdb warning and succeeded installing.
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
debuginfo-install
is a command of yum-utils
, so
yum install yum-utils
debuginfo-install glibc
/etc/yum.repos.d/CentOS-Debuginfo.repo
, set enabled=1