-sh: gdb: not found
时间: 2023-10-08 21:14:50 浏览: 298
It seems that your system does not have GDB (GNU Debugger) installed. You can install GDB on Ubuntu or Debian-based systems using the following command:
```
sudo apt-get install gdb
```
On CentOS, Fedora or RHEL-based systems, you can install GDB using the following command:
```
sudo dnf install gdb
```
Once installed, you can use the `gdb` command to debug your programs.
相关问题
-bash: gdb: command not found
-bash: gdb: command not found这个错误是因为你的系统中没有安装gdb。你可以通过以下步骤来解决这个问题:
1. 首先,你可以使用包管理器来安装gdb。如果你使用的是macOS系统,可以使用Homebrew来安装gdb。在终端中运行以下命令来安装Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. 安装完Homebrew后,再运行以下命令来安装gdb:
brew install gdb
3. 如果安装过程中出现权限问题,可以尝试运行以下命令来修复权限:
sudo chown $(whoami):admin /usr/local/include
sudo chown $(whoami):admin /usr/local/lib/pkgconfig
4. 安装完成后,你可以尝试输入gdb命令来验证是否安装成功。
阅读全文
相关推荐
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![txt](https://img-home.csdnimg.cn/images/20241231045021.png)
![application/pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![tgz](https://img-home.csdnimg.cn/images/20250102104920.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)