CentOS 7.2.1511 gdb调试php-7.1.0源码报错:Missing separate debuginfos, use: debuginfo-install glibc-2.17-157.el7_3.5.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 nss-softokn-freebl-3.36.0-5.el7_5.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-18.el7.x86_64
需要通过debuginfo-install安装glibc libxml2 nss-softokn-freebl xz-libs zlib glibc
安装时发现/etc/yum.repos.d目录下没有debuginfo相关的库文件,新建库文件:CentOS-Debuginfo.repo
内容如下:
[base-debuginfo]
name=CentOS-7 - Debuginfo
baseurl=http://debuginfo.centos.org/7/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-7
enabled=1
继续安装以上库文件:debuginfo-install libxml2 nss-softokn-freebl xz-libs zlib glibc
安装成功后,gdb就正常了