Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    command not found

    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

    when I get it right you try to start gcc from the shell.
    First, find the program:
    (as root)
    find / -name gcc
    I assume it sits somewhere in /usr/bin
    Check if that directory is within the path
    echo $PATH
    If it is, it should run, if not, add the path
    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
    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
    thanks buddy
    solved the problem

    join to FOSS
    Linux Rocks!!!

  4. $spacer_open

Posting Permissions

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