Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to compile a cpp program through the terminal on 13.04 but got this message:

npg@NPG-ideaPad-S210:~$ gcc -o comp-LCG.cpp
The program 'gcc' can be found in the following packages:
 * gcc
 * pentium-builder
Try: sudo apt-get install <selected package>

What should I do ?

share|improve this question
This says you don't have GCC installed. It already says what to do: sudo apt-get install gcc – the_Seppi Jan 22 '14 at 15:32

I suggest you open a terminal and do:

sudo apt-get install build-essential

Then try again.

share|improve this answer
sudo apt-get install build-essential
  1. Enter this command in a terminal window to open the gedit text editor.

    gedit progcpp.cpp
  2. To compile the program enter the command given below in a terminal window.

    g++ progcpp.cpp -o progcpp
  3. Enter the command given below to run the program.

share|improve this answer
Thanks I finally managed – user238660 Feb 5 '14 at 20:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.