No such file or directory

Eliot Moss moss@cs.umass.edu
Mon Jul 6 16:59:13 GMT 2020


On 7/6/2020 12:41 PM, ASSI wrote:
> Billie Healy via Cygwin writes:
>> I downloaded Cygwin for use in a C programming class. I made sure to also
>> include gcc, make, nano, and vim. Nano and Vim do fine, but when I enter
>> gcc hello.c
>> bash reponds "no such file or directory."
> 
> It would help if you posted the actual command line and response on the
> terminal.  If gcc was complaining about hello.c missing then it would
> give you a more elaborate error message than what you have shown and if
> bash was complaining about gcc missing it would say "gcc: command not
> found".

And I would ask: "Is gcc on your path?"  For example, on my system, which
has gcc installed, the response to "type gcc" is "/usr/bin/gcc".  If I
do "type xxx" (some non-existent program) I get "xxx: not found".

Sounds to me like you may need to set up your PATH variable ...

If you're going to be using cygwin, then this should be a somewhat
familiar concept.  One typical place to set it up is in your
.bash_profile file in your HOME directory (mine is /home/moss in
the cygwin tree).

Best _EM


More information about the Cygwin mailing list