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

Recently I have installed Code::Blocks IDE on my Ubuntu 12.10. The following error appears when I try to run or compile any code written in there:

Compiling: /home/sabbir/first.cpp
/bin/sh: 1: g++: not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings

How can I solve this problem?

share|improve this question
up vote 10 down vote accepted

Most likely you are simply missing a compiler.

Get one by installing build-essential package.

Typing sudo apt-get install build-essential into terminal is one of the easiest ways to achieve that.

share|improve this answer

i think you have to install g++ c++ compiler using synaptic package manager

share|improve this answer
Synaptic is no longer installed in Ubuntu by default. It might be better to suggest one of the methods more readily available such as apt-get or software centre eg "sudo apt-get install g++" – fabricator4 Dec 4 '12 at 11:43

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.