 |
20-09-2008, 01:05 PM
|
#1 (permalink)
|
|
Back!
Join Date: Jun 2007
Location: Bangalore
Posts: 513
|
ubuntu - gcc package problem
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..
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
20-09-2008, 01:20 PM
|
#2 (permalink)
|
|
Human Spambot
Join Date: Jan 2007
Location: Lat 28.38°N , Longt 77.13°E
Posts: 2,431
|
Re: ubuntu - gcc package problem
^^Gcc follows standard C++, so header files are to be used without .h extension. Try with #include<cstdio>
|
|
|
20-09-2008, 01:22 PM
|
#3 (permalink)
|
|
Back!
Join Date: Jun 2007
Location: Bangalore
Posts: 513
|
Re: ubuntu - gcc package problem
^^ nah not working... .getting similar error
|
|
|
20-09-2008, 04:25 PM
|
#4 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,492
|
Re: ubuntu - gcc package problem
For C++,
Code:
#include<iostream>
using namespace std;
For C,
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
|
|
|
20-09-2008, 05:19 PM
|
#5 (permalink)
|
|
in search of myself
Join Date: Sep 2006
Location: Gurgaon
Posts: 1,720
|
Re: ubuntu - gcc package problem
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
__________________
::::::::::::::::::::
Unban Praka123
::::::::::::::::::::
Vista is my Secretary | Mac is my Girlfriend | Linux is my Wife
"Ek Se Mera Kya Hoga" :lol:
|
|
|
20-09-2008, 05:38 PM
|
#6 (permalink)
|
|
Commander in Chief
Join Date: Jul 2005
Posts: 6,658
|
Re: ubuntu - gcc package problem
And the build-essential bundle can also be installed from the Installer/Live CDs, in case you don't have internet access on Linux.
__________________
Harsh J
www.harshj.com
|
|
|
20-09-2008, 05:49 PM
|
#7 (permalink)
|
|
in search of myself
Join Date: Sep 2006
Location: Gurgaon
Posts: 1,720
|
Re: ubuntu - gcc package problem
^^ Yes. Here's how
Insert cd in drive and enter following commands one by one
Quote:
sudo apt-cdrom add
sudo apt-get update
sudo apt-get install build-essential
|
__________________
::::::::::::::::::::
Unban Praka123
::::::::::::::::::::
Vista is my Secretary | Mac is my Girlfriend | Linux is my Wife
"Ek Se Mera Kya Hoga" :lol:
|
|
|
21-09-2008, 12:59 AM
|
#8 (permalink)
|
|
Back!
Join Date: Jun 2007
Location: Bangalore
Posts: 513
|
Re: ubuntu - gcc package problem
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 ???
|
|
|
21-09-2008, 02:16 AM
|
#9 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: ubuntu - gcc package problem
Aah well.. happens sometime. Try using vim instead of vi.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
21-09-2008, 09:08 AM
|
#10 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,492
|
Re: ubuntu - gcc package problem
^^And if you are a n00b like me, use nano.
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
|
|
|
21-09-2008, 09:14 AM
|
#11 (permalink)
|
|
Commander in Chief
Join Date: Jul 2005
Posts: 6,658
|
Re: ubuntu - gcc package problem
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!
__________________
Harsh J
www.harshj.com
|
|
|
21-09-2008, 09:15 AM
|
#12 (permalink)
|
|
OSS Enthusiast!
Join Date: Sep 2005
Location: Hills of Kumaoun
Posts: 664
|
Re: ubuntu - gcc package problem
^^
Yeah..Even I am more comfortable with Nano.
__________________
Do you know, Shinigamis only eat apples???
|
|
|
21-09-2008, 09:51 AM
|
#13 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: ubuntu - gcc package problem
@QM
Hmm... Point...
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
21-09-2008, 08:43 PM
|
#14 (permalink)
|
|
Back!
Join Date: Jun 2007
Location: Bangalore
Posts: 513
|
Re: ubuntu - gcc package problem
@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 ??
|
|
|
22-09-2008, 03:37 PM
|
#15 (permalink)
|
|
The Smaller Bang
Join Date: Sep 2007
Location: Gautham City
Posts: 7,492
|
Re: ubuntu - gcc package problem
Quote:
Originally Posted by n6300
@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
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.
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|