为了设置从终端运行的racket,我创建了一个符号链接,从 / Applications / Racket \ v6.2.1 / bin / racket 到 / usr / local / bin / racket 使用命令
ln -s "/Applications/Racket\ v6.2.1/bin/racket" /usr/local/bin/racket
但是,当我尝试从终端运行 racket 时,我收到错误" -bash:racket:command not found" 。我已经检查过/ usr / local / bin是否在我的PATH中。我哪里错了?
答案 0 :(得分:10)
pu@pumbair: ~ echo "/Applications/Racket\ v6.2.1/bin/racket"
/Applications/Racket\ v6.2.1/bin/racket
如您所见,这会在文件名中留下\符号,这是错误的。
引用并且不要逃避空间,
pu@pumbair: ~ echo "/Applications/Racket v6.2.1/bin/racket"
/Applications/Racket v6.2.1/bin/racket
或逃脱空间,不要引用
pu@pumbair: ~ echo /Applications/Racket\ v6.2.1/bin/racket
/Applications/Racket v6.2.1/bin/racket
所以我只是
ln -sf /Applications/Racket\ v6.2.1/bin/racket /usr/local/bin/racket