[root@localhost 1day]# gdb 3
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-48.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/linux文本/c或c++文本/c++/1day/3...done.
(gdb) r
Starting program: /home/linux文本/c或c++文本/c++/1day/3
helloworld today is a gift!
a=10
0
1
Program exited normally.
Missing separate debuginfos, use: debuginfo-install libgcc-4.4.5-6.el6.x86_64 libstdc++-4.4.5-6.el6.x86_64
(gdb)q
[root@localhost 1day]# debuginfo-install libgcc-4.4.5-6.el6.x86_64 libstdc++-4.4.5-6.el6.x86_64
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Could not find debuginfo for main pkg: libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo for main pkg: libstdc++-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libstdc++-4.4.5-6.el6.x86_64
No debuginfo packages available to install
[root@localhost 1day]# debuginfo-install --nogpgcheck libgcc-4.4.5-6.el6.x86_64 libstdc++-4.4.5-6.el6.x86_64
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Could not find debuginfo for main pkg: libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo for main pkg: libstdc++-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libgcc-4.4.5-6.el6.x86_64
Could not find debuginfo pkg for dependency package libstdc++-4.4.5-6.el6.x86_64
No debuginfo packages available to install
[root@localhost 1day]#
本人机台不能联网,所以没法下载,同时通过centos-debuginfo.repo的http://debuginfo.centos.org/6/$basearch/ 貌似没有搜索到libgcc-4.4.5-6.el6.x86_64 libstdc++-4.4.5-6.el6.x86_64,本人由于无法联机,所以对baseurl做了改变。(感觉不对还请赐教)
[debug]
16 name=CentOS-6 - Debuginfo
17 #baseurl=http://debuginfo.centos.org/6/$basearch/
18 baseurl=file:///home/Centos6/
19 gpgcheck=1
20 gpgkey=file:///home/Centos6/RPM-GPG-KEY-CentOS-Debug-6
21 enabled=1
劳烦各位绅士提供下libgcc-4.4.5-6.el6.x86_64 libstdc++-4.4.5-6.el6.x86_64,非常感谢!
看起来你正在尝试为你的libgcc和libstdc++库安装调试信息,但由于你的机器不能连接到互联网,所以这并不容易。
首先,我需要强调的是,只有在你需要深入库函数并查看它们的具体实现时,你才真正需要这些调试信息。如果你只是调试你自己的代码,那么这些调试信息并不是必需的。
但是,如果你仍然需要这些调试信息,那么你需要找到一个可以访问互联网的机器,从CentOS的调试信息仓库中下载正确版本的debuginfo包,然后将这些包复制到你的机器上。
你可以尝试在有网络连接的机器上运行以下命令来获取需要的包:
debuginfo-install --downloadonly --downloaddir=<directory> libgcc-4.4.5-6.el6.x86_64 libstdc++-4.4.5-6.el6.x86_64
这个命令将下载必要的包而不是安装它们。你可以把 <directory>
替换为你想要下载包的路径。然后,你可以将这些包复制到你的机器上,并使用 rpm
命令安装它们。
然而,请注意这需要特定的包版本,你所提供的版本在我搜索时似乎并未能找到。你可能需要根据你的系统安装的实际库版本来调整这些版本号。
希望这些信息对你有所帮助。如果你有更多的问题,请随时提问。