web-dev-qa-db-fra.com

Comment installer le compilateur g ++?

J'ai essayé ce qui suit:

Sudo apt-get install build-essential 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Mais quand je compile le terminal montre ce qui suit:

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

Que devrais-je faire?

22
Siddharth Bhardwaj

La réponse est dans votre question:

Try: Sudo apt-get install <selected package>

Dans ton cas:

Sudo apt-get install g++
33
Radu Rădeanu