直接在命令行中输入以下命令即可。 sudo apt-get install build-essential 安装完成后输入 gcc 和 g++ 进行确认。 转载于:https://www.cnblogs.com/Hitman_47/p/5246815.html