In an attempt to set up racket to run from the Terminal, I created a symlink from /Applications/Racket\ v6.2.1/bin/racket to /usr/local/bin/racket with the command
ln -s "/Applications/Racket\ v6.2.1/bin/racket" /usr/local/bin/racket
However, when I try to run racket from the Terminal, I get the error "-bash: racket: command not found". I have checked that /usr/local/bin is in my PATH. Where am I wrong?
You can also run it from its folder, which you can find in Program Files → Racket → DrRacket. On Mac OS, double click on the DrRacket icon. It is probably in a Racket folder that you dragged into your Applications folder.
In the Terminal app on your Mac, press the Up Arrow key. The last command you entered appears on the command line. Continue pressing the Up Arrow key until you see the command you want, then press Return.
On Linux, start it by typing drracket to the shell prompt. You'll need to use XWindows -- DrRacket will come up in a separate window. Finally, you can download it and install it on a personal machine from http://racket-lang.org/download. It's free.
On Mac OS and Linux, this path will be something like "/path/to/racket/bin". On Windows, it'll be something like "C:\Program Files\Racket". Then, from the terminal, you'll be able to run racket and raco (see raco: Racket Command-Line Tools).
pu@pumbair: ~ echo "/Applications/Racket\ v6.2.1/bin/racket"
/Applications/Racket\ v6.2.1/bin/racket
As you see, this leaves the \ sign in the file name which is wrong.
Either quote and don't escape space,
pu@pumbair: ~ echo "/Applications/Racket v6.2.1/bin/racket"
/Applications/Racket v6.2.1/bin/racket
or escape space and don't quote
pu@pumbair: ~ echo /Applications/Racket\ v6.2.1/bin/racket
/Applications/Racket v6.2.1/bin/racket
so I'd just
ln -sf /Applications/Racket\ v6.2.1/bin/racket /usr/local/bin/racket
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With