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'm using Ubuntu 11.04 (VMware). I aim to implement OpenMP. Im using gcc 4.5 compiler. I tried to install it by using the command sudo apt-get install gcc 4.5. Afterwards I proceed with gcc -fopenmp foo.c BUT the output was: gcc: foo.c: No such file or directory gcc: no input files –. Now I tried to install the package by using :

ubuntu@ubuntu:~$ sudo apt-get install essential 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package essential. 

I also tried apt-cache search essential and after that sudo apt-get install essential-dev
But the same error again,

 E: Unable to locate package essential-dev

Any solution,please?

Do I need to download any package? What should I do?

share|improve this question
The fact that Im running Ubuntu in a virtual machine makes it more complicated? – Anita 7 Jun 1 '12 at 16:07
No, absolutely not. – Anwar Shah Aug 1 '12 at 18:01
up vote 2 down vote accepted

sudo apt-get install build-essential installs the essential development tools.

As for the GCC error, you need a source file foo.c before you can attempt to compile it!

share|improve this answer
Which is the 1st thing to do? – Anita 7 Jun 1 '12 at 16:18
First install, then create foo.c. – izx Jun 1 '12 at 16:47
the output is: ubuntu@ubuntu:~$ 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 278 not upgraded. How can I create foo.c? – Anita 7 Jun 2 '12 at 14:31
By sudo apt-get install gcc 4.5? – Anita 7 Jun 2 '12 at 14:54
@Anita7 Try some C development pages. The Ask Ubuntu site is not a Q/A site for C or any other languages. Sorry. – Anwar Shah Aug 1 '12 at 18:03

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.