每当我尝试用编译 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