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

When I'm trying to compile a C++ program with gcc, it gives me following error:

gcc: error trying to exec 'cc1plus': execvp: No such file or directory
error: command 'gcc' failed with exit status 1
share|improve this question

You're missing g++ package on your machine. Install it via:

sudo apt-get install g++

Reference.

share|improve this answer
    
Just for a clarification: Default Ubuntu installation comes with gcc, but not with g++. – Andrejs Cainikovs May 21 '12 at 10:45

Your Answer

 
discard

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.