Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running racket from terminal in OS X

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?

like image 546
ccln Avatar asked Nov 19 '15 19:11

ccln


People also ask

How do you run a racket on a Mac?

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.

How do I run code in Apple terminal?

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.

How do I run a racket in Linux?

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.

Where is racket installed Mac?

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).


1 Answers

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
like image 76
uselpa Avatar answered Oct 07 '22 18:10

uselpa