Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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

 
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.