Find the answer to your Linux question:
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 ...
  1. #1
    Just 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:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Couldn't find package build
    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:
    error: stdio.h: No such file or directory
    i thought the problem was that i didn't have internet and i had to execute this:
    sudo apt-cdrom add
    sudo apt-get update
    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..

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Did you execute apt-get install build-essential command after executing add-cdrom and update commands?
    Code:
    sudo apt-get add-cdrom
    sudo apt-get update
    sudo apt-get install build-essential
    In case it doesn't work, post the code of your C Program here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Oct 2007
    Posts
    60
    Quote Originally Posted by devils_casper View Post
    Did you execute apt-get install build-essential command after executing add-cdrom and update commands?
    Code:
    sudo apt-get add-cdrom
    sudo apt-get update
    sudo apt-get install build-essential
    In case it doesn't work, post the code of your C Program here.
    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
    Sudo apt-get add-cdrom
    E: Invalid operation add-cdrom
    the code is nothing..im sure its not the code, but here it is anwyay
    #include <stdio.h>

    int main()
    {
    return 0;
    }

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    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

  5. #5
    Just 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).

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    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

  7. #7
    Just 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...