5
votes

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?

1

1 Answers

14
votes
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