如何解析编译器来编译c++程序?

如何解析编译器来编译c++程序?

每当我尝试用编译 C++ 程序时g++ hello.cpp,我都会得到:

The program 'g++' can be found in the following packages:
 * g++
 * pentium-builder
Try: sudo apt-get install <selected package>

然后如果我运行sudo apt-get install g++它输出:

E: Unable to correct problems, you have held broken packages.

答案1

修复“持有破损包裹”错误

sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update

相关内容