27

I have tried the following:

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.

But when I compile the terminal shows the following:

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>

What should I do?

Charo
  • 3,681
Siddharth Bhardwaj
  • 379
  • 1
  • 3
  • 3

1 Answers1

37

The answer is in your question:

Try: sudo apt-get install <selected package>

In your case:

sudo apt-get install g++
Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407