Page 1 of 8 123 ... LastLast
Results 1 to 10 of 75

Thread: stdio.h: No such file or directory

  1. #1
    Join Date
    Apr 2006
    Location
    just North of Boston
    Beans
    222
    Distro
    Ubuntu 10.04 Lucid Lynx

    stdio.h: No such file or directory

    I just switched my desktop OS to Ubuntu 6.10.

    I wanted to play around with C a bit but ran into a problem.

    I was getting the error

    Code:
     stdio.h: No such file or directory
    I have read through the forums and saw people with the same issue.

    I tried

    Code:
    sudo apt-get install build-essential
    Which gave me an error

    I then tried

    Code:
    sudo aptitude install build-essential
    It installed build-essential however it didn't solve the problem I am getting when compiling

    my sample program:
    Code:
    #include <stdio.h>
    
    int 
    main(int argc, char* argv[])
    {
        printf ("hello world\n");
    
        return 0;
    }
    I type

    Code:
    gcc test1.c
    and still get

    Code:
     stdio.h: No such file or directory
    What am I doing wrong?

    Thanks,

  2. #2
    Join Date
    Sep 2006
    Beans
    Hidden!

    Re: stdio.h: No such file or directory

    prezbedard,

    What's the output of the following commands?
    Code:
    $ sudo updatedb
    $ locate stdio.h

  3. #3
    Join Date
    Feb 2005
    Location
    Arrowtown, New Zealand
    Beans
    102
    Distro
    Ubuntu 6.06 Dapper

    Re: stdio.h: No such file or directory

    It sounds like either the build-essentials didn't install correctly. Check the contents of /usr/include to see if stdio.h is in there.

  4. #4
    Join Date
    Apr 2006
    Location
    just North of Boston
    Beans
    222
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: stdio.h: No such file or directory

    Quote Originally Posted by po0f View Post
    prezbedard,

    What's the output of the following commands?
    Code:
    $ sudo updatedb
    $ locate stdio.h
    sudo updatedb

    I put the password in , pauses for a few moments then goes back to a prompt no output.

    locate stdio.h

    produces
    Code:
    /usr/lib/perl/5.8.8/CORE/nostdio.h

  5. #5
    Join Date
    Apr 2006
    Location
    just North of Boston
    Beans
    222
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: stdio.h: No such file or directory

    Quote Originally Posted by foxylad View Post
    It sounds like either the build-essentials didn't install correctly. Check the contents of /usr/include to see if stdio.h is in there.
    Nope doesn't appear to be there.

  6. #6
    Join Date
    Oct 2006
    Beans
    144

    Re: stdio.h: No such file or directory

    Code:

    sudo apt-get install build-essential

    Which gave me an error


    what error?

    sub #include <stdio.h> with #include <iostream>
    you should use iostream instead of outdated stdio.h
    http://www.cacs.louisiana.edu/~mgr/404/burks/language/cpp/cppfaq/inputout.htm#[15.1]
    Last edited by bradleyd; December 9th, 2006 at 01:40 AM.

  7. #7
    Join Date
    Apr 2006
    Location
    just North of Boston
    Beans
    222
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: stdio.h: No such file or directory

    Quote Originally Posted by bradleyd View Post
    Code:

    sudo apt-get install build-essential

    Which gave me an error


    what error?

    sub #include <stdio.h> with #include <iostream>
    you should use iostream instead of outdated stdio.h
    http://www.cacs.louisiana.edu/~mgr/404/burks/language/cpp/cppfaq/inputout.htm#[15.1]
    Code:
     sudo apt-get install build-essential
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package build-essential is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package build-essential has no installation candidate

  8. #8
    Join Date
    Oct 2006
    Beans
    144

    Re: stdio.h: No such file or directory

    Quote Originally Posted by prezbedard View Post
    Code:
     sudo apt-get install build-essential
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package build-essential is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package build-essential has no installation candidate
    what do you get when you type apt-cache search build-essential

  9. #9
    Join Date
    Apr 2006
    Location
    just North of Boston
    Beans
    222
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: stdio.h: No such file or directory

    Quote Originally Posted by bradleyd View Post
    what do you get when you type apt-cache search build-essential

    Code:
     sudo apt-cache search build-essential
    sbuild - Tool for building Debian binary packages from Debian sources

  10. #10
    Join Date
    Oct 2006
    Beans
    144

    Re: stdio.h: No such file or directory

    what does your /etc/apt/sources.list look like?

Page 1 of 8 123 ... LastLast

Bookmarks

Posting Permissions

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