Results 1 to 7 of 7
Hey..
i had to take linux off my computer and install it back, so i had to reconfigure everything...and i was trying to re install the gcc compiler as someone ...
- 03-18-2008 #1Just Joined!
- Join Date
- Oct 2007
- Posts
- 60
Getting gcc compiler running
Hey..
i had to take linux off my computer and install it back, so i had to reconfigure everything...and i was trying to re install the gcc compiler as someone told me before from the Ubuntu CD in this forum by typing:
sudo apt-get install build essential
however, this is what i got back:
i tried to write a simple C program, t.c, and when i tried compiling it by gcc t.c -o t, this is the error it gave me:Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package build
i thought the problem was that i didn't have internet and i had to execute this:error: stdio.h: No such file or directory
and it didn't work...the second one downloaded a bunch of packages, but didn't change anything regarding the gcc compiler...Any help would be appreciated, and i need the compiler asap.so thanks..sudo apt-cdrom add
sudo apt-get update
- 03-18-2008 #2
Did you execute apt-get install build-essential command after executing add-cdrom and update commands?
In case it doesn't work, post the code of your C Program here.Code:sudo apt-get add-cdrom sudo apt-get update sudo apt-get install build-essential
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 03-18-2008 #3Just Joined!
- Join Date
- Oct 2007
- Posts
- 60
hi..
i thought that the first one was: sudo apt-cdrom add...
anyway i wrote the sequence exactly like you wrote and its the same problem..
the first command you gave me: sudo apt-get add-cdrom gave this error
the code is nothing..im sure its not the code, but here it is anwyaySudo apt-get add-cdrom
E: Invalid operation add-cdrom
#include <stdio.h>
int main()
{
return 0;
}
- 03-18-2008 #4
My Mistake !
Code:sudo apt-cdrom add sudo apt-get update sudo apt-get install build-essential
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 03-18-2008 #5Just Joined!
- Join Date
- Oct 2007
- Posts
- 60
after i typed: sudo apt-get install build-essential
this is what i got on the terminal:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:4.1.1) but it is not going to be installed
Depends: dpkg-dev (>= 1.13.5) but it is not going to be insta lled
j2re1.4-mozilla-plugin: Depends: j2re1.4 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a s olution).
- 03-19-2008 #6
Execute this
Code:sudo apt-get -f install
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 03-19-2008 #7Just Joined!
- Join Date
- Oct 2007
- Posts
- 60
ya i think that was the problem...gcc is working now..the C library has been unpacked...thanks


Reply With Quote
