./main
zsh: no such file or directory: ./main
If you are trying to run a Rust Language program on your Terminal and you get "no such file or directory", well there could be two reasons for this error,
- You have not compiled your program yet, hence the complied file is not yet created. You can compile your Rust Program file as follows,
rustc <file-name.rs> - If you think you have completed your file, then make sure that file exists at the location you are running it. Do a dir or ls command in the Terminal/Command Prompt to check based on your Operating System (Windows or Mac/Linux respectively).
ls -ltrh total 824 -rw-r--r--@ 1 c2ctech staff 43B Jul 18 07:10 main.rs -rwxr-xr-x 1 c2ctech staff 407K Jul 18 07:49 main

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!