开发者

Trouble trying to install MIT-Scheme on MacOSX Snow Leopard

开发者 https://www.devze.com 2023-02-25 04:24 出处:网络
I am trying to install MIT-Sch开发者_如何学Ceme so that i can use it off my terminal instead of using an IDE, however, I am having difficulty trying to find tutorials that are actually up to date and

I am trying to install MIT-Sch开发者_如何学Ceme so that i can use it off my terminal instead of using an IDE, however, I am having difficulty trying to find tutorials that are actually up to date and works.


You can install MIT Scheme through Macports, and it will probably take a long time (it's compiling it from source, I think). You can also get a precompiled binary from here which will install an MIT-Scheme.app which starts Edwin an Emacs port or something which includes a Scheme debugger and REPL. But you can also start it from the command line.

Check to see where it installed to, on my machine it's here /Applications/mit-scheme.app/Contents/Resources/ but that might vary. Add this directory to your PATH by editing ~/.bash_profile and adding this:

export PATH=$PATH":/Applications/mit-scheme.app/Contents/Resources/"

Check with which mit-scheme to make sure it installed correctly.

As for Racket, there's also a precompiled binary available from here. (It might be in Macports but it might not be, or in Fink, I don't know. I try to avoid those and use Homebrew if possible.) This is a dmg file which you can extract and put wherever you want. I put mine in ~/bin and added ~/bin/racket/bin/ to my PATH as well, same process as above, but you can put it anywhere, /Applications/ or whatever.

Good luck.


This seems like a odd answer since it's about Racket for a question that was originally about MIT Scheme, but since you tried Racket too...

To run Racket from the terminal, you need to use the racket executable, which is found in the bin subdirectory. For example, if you install it at /Applications/Racket-5.1, then you'd run /Applications/Racket-5.1/bin/racket. (And you could modify your $PATH or add some symlink to make it possible to run without specifying the full path.)


You can find the detailed answer here.

Here is a short version:

  1. Download .dmg file of MIT-Scheme. 32-bit or 64-bit based on your hardware architecture.

  2. After installation run the following commands

For 32-bit package:

sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-i386

sudo ln -s /usr/local/lib/mit-scheme-i386/mit-scheme /usr/bin/scheme

For 64-bit package:

sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-x86-64

sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/bin/scheme
  1. To run MIT-Scheme from your terminal just type 'scheme' in the command prompt.
0

精彩评论

暂无评论...
验证码 换一张
取 消