Find the answer to your Linux question:
Results 1 to 3 of 3
hello, i am trying C program but while compiling with gcc it is showing command not found.i tried by exporting the PATH of gcc but still it is not executing:I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    6

    command not found


    hello,
    i am trying C program but while compiling with gcc it is showing command not found.i tried by exporting the PATH of gcc but still it is not executing:I am totally confused:
    please tell me how to fix command not found in centos???

  2. #2
    Just Joined! its_really_me's Avatar
    Join Date
    Mar 2010
    Location
    Germany
    Posts
    25
    Hi,

    when I get it right you try to start gcc from the shell.
    First, find the program:
    (as root)
    Code:
    find / -name gcc
    I assume it sits somewhere in /usr/bin
    Check if that directory is within the path
    Code:
    echo $PATH
    If it is, it should run, if not, add the path
    Code:
    export PATH=$PATH:/usr/bin
    You might want to add this path to your .bash_profile file in your home directory (hidden).

    If a module is not found, check if it is installed:
    for gcc this is
    Code:
    yum list installed gcc
    My second thought is that you want to call a program from C - in that case use the full path in the command line.

  3. #3
    Just Joined!
    Join Date
    May 2010
    Posts
    6
    thanks buddy
    solved the problem

    join to FOSS
    Linux Rocks!!!

  4. $spacer_open
    $spacer_close

Posting Permissions

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