DIGIT-ARC read-only archive · snapshot: July 23, 2026

ubuntu - gcc package problem

15 posts · originally from https://geek.digit.in/community/threads/ubuntu-gcc-package-problem.98065/

red_devil
red_devil Original post #1
Sep 20, 2008 at 1:05 PM
Guys, today i installed a copy of Ubuntu 7.04 { from a CD and not a DVD }... since the CD comes with limited packages, i'm having a problem with the GCC package.

i tried to run some sample C program to make sure the GCC was properly installed and when i tried to compile, i got an error message saying
Code:
error: stdio.h: No such file or directory

now i want to know how i can completely remove any existing GCC package and install GCC again so that i'm able to run any of the codes easily..
T
Sep 20, 2008 at 1:20 PM
^^Gcc follows standard C++, so header files are to be used without .h extension. Try with #include<cstdio>
red_devil
Sep 20, 2008 at 1:22 PM
^^ nah not working... .getting similar error
MetalheadGautham
Sep 20, 2008 at 4:25 PM
For C++,
Code:
#include<iostream>
using namespace std;

For C,
Code:
#include<stdio>
CadCrazy
Sep 20, 2008 at 5:19 PM
You have only installed gcc compiler and not the standard c header/lib files. To install all run following command in terminal

Code:
sudo apt-get install build-essential

Happy programming :D
QwertyManiac
Sep 20, 2008 at 5:38 PM
And the build-essential bundle can also be installed from the Installer/Live CDs, in case you don't have internet access on Linux.
CadCrazy
Sep 20, 2008 at 5:49 PM
^^ Yes. Here's how
Insert cd in drive and enter following commands one by one

sudo apt-cdrom add
sudo apt-get update
sudo apt-get install build-essential
red_devil
Sep 21, 2008 at 12:59 AM
ah thanks guys...it worked...{ the online update thing worked.. the one suggested by CadCrazy didn't :( }

and btw me facing some newer problems... VI editor doesn't seem to be working fine... the insertion of text isn't happening properly... i guess some problem with the INSERT mode of the editor...any suggestions wrt this ???
infra_red_dude
Sep 21, 2008 at 2:16 AM
Aah well.. happens sometime. Try using vim instead of vi.
MetalheadGautham
Sep 21, 2008 at 9:08 AM
^^And if you are a n00b like me, use nano.
QwertyManiac
Sep 21, 2008 at 9:14 AM
infra_red_dude - I doubt if the vi he is using is classic, cause on most newer distros vi is a mere link to vim!
nitish_mythology
Sep 21, 2008 at 9:15 AM
^^
Yeah..Even I am more comfortable with Nano.
red_devil
red_devil #14
Sep 21, 2008 at 8:43 PM
@QM- i dunno if the VI i'm using is a classic version or not .. its the default thing that comes with Ubuntu 7.04 cd...

and how do i install vim ??
MetalheadGautham
Sep 22, 2008 at 3:37 PM
@QM- i dunno if the VI i'm using is a classic version or not .. its the default thing that comes with Ubuntu 7.04 cd...

and how do i install vim ??
7.04 ? Then I think its vim. I used Ubuntu 7.04 for a whole year. It was my first distro :D

And yeah, you might want to try out nano if you want something without all those confusing shortcuts and what not. Its just a text editor, a plain and simple one, and feels like using notepad without mouse. Any actions like quiting, cuting, etc need you to use ctrl+key, with the keys being defined in the bottom of the window itself for you to see.