There are two ways you can install GDB on your linux machine.
1. Install pre-built gdb binaries from verified distribution resources
You can install gdb on Debian-based linux distro (e.g. Ubuntu, Mint, etc) by following command.
$ sudo apt-get update
$ sudo apt-get install gdb
2. Download source code of GDB, compile it and install.
可以从下面的网址中下载可用的gdb文件,版本不是很重要,哪个能编译成功用哪个
http://ftp.gnu.org/gnu/gdb
Follow below mentioned steps to compile GDB from scratch and install it.
Step-1: Download source code.
You can download source code of all release from http://ftp.gnu.org/gnu/gdb/
$ wget “http://ftp.gnu.org/gnu/gdb/gdb-7.11