Running racket from terminal in OS X
Asked Answered
M

1

6

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?

Mori answered 19/11, 2015 at 19:32 Comment(0)
H
16
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
Hartzell answered 19/11, 2015 at 19:46 Comment(1)
Thanks for solving and explaining :)Mori

© 2022 - 2024 — McMap. All rights reserved.