Results 1 to 4 of 4

Thread: No such file or directory

  1. #1
    Join Date
    Apr 2009
    Beans
    1

    No such file or directory

    I have just installed UBUNTU on one of my home PC n I have compiled a simple program but the terminal giving me such type of response.

    gcc -o prog prog.c

    prog:1:19:error:stdio.h:No such file or directory

    prog:2:20:error:stdlib.h:No such file or directory

    prog:3:23:error:sys/types.h:No such file or directory

    n etc

    so please tel me what should I do to over come this problem.
    And if the answer is to install a certain package than do let me know the name of that package and the name of the website so that I could be able to install it.

  2. #2
    Join Date
    Nov 2006
    Location
    Montana
    Beans
    156
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: No such file or directory

    Are you able to find those references from your program, are they in the same directory as the program? You might need to set environment variables.

  3. #3
    Join Date
    Mar 2009
    Beans
    609
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: No such file or directory

    Add /usr/include to your Path.

    Open a terminal and type:

    Code:
    gedit /home/username/.profile
    Edit this area:

    Code:
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi
    PATH="$HOME/bin:/usr/include:$PATH"
    Last edited by codeseer; April 21st, 2009 at 04:43 PM.
    You do not want an invalid magic cookie.

  4. #4
    Join Date
    Oct 2006
    Location
    Tucson, AZ
    Beans
    1,420
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: No such file or directory

    Quote Originally Posted by sirus the virus View Post
    I have just installed UBUNTU on one of my home PC n I have compiled a simple program but the terminal giving me such type of response.

    gcc -o prog prog.c

    prog:1:19:error:stdio.h:No such file or directory

    prog:2:20:error:stdlib.h:No such file or directory

    prog:3:23:error:sys/types.h:No such file or directory

    n etc

    so please tel me what should I do to over come this problem.
    And if the answer is to install a certain package than do let me know the name of that package and the name of the website so that I could be able to install it.
    Try this:
    Code:
    sudo apt-get install build-essential
    By default, Ubuntu does *not* install a complete build system. Those errors indicate that you're missing the standard include files, which the build-essential package will install (along with many other things you'll probably need).

    Lloyd B.
    Don't tell me to get a life.
    I had one once.
    It sucked.

Tags for this Thread

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
  •