更新并安装下库就行了 sudo apt-get update sudo apt-get install build-essential gdb 参考文章 https://code.visualstudio.com/docs/cpp/config-linux