61

I want to install MIT Scheme on my Mac, I have downloaded the MacOS X binary(x86-64).

However, I could not make it work using Mac Terminal.

I have tried to follow these articles:

Installing MIT/GNU Scheme on Mac OS X Leopard

Installing MIT Scheme on Mac OS X

but it seems out of date and does not work.

So, I'm looking for a simple method which allows me to write Scheme code using Mac Terminal.

I have struggled for hours to try to install it.

Flux
  • 9,805
  • 5
  • 46
  • 92
Timeless
  • 7,338
  • 9
  • 60
  • 94
  • What do you mean by "does not work"? What does it do, and how is that different from what you expect? – Cody Sep 07 '12 at 17:06
  • @Cody the 1st link assume what you downloaded is a tar file, but what i download is a dmz file , and for the 2nd link after i type the command sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources/mit-scheme /usr/bin/scheme , followed by type "scheme" it does not work according to the post. – Timeless Sep 07 '12 at 17:09
  • again, you have to be more specific than "does not work". what is the error message that you get when you try to run the command? – Cody Sep 07 '12 at 17:51
  • How is this "not related to programming"? Stackoverflow really blows these days – Johan Kotlinski Sep 07 '12 at 18:00
  • @Cody there is no error message.i just follow the instruction from 2nd article and it does not work without error message – Timeless Sep 07 '12 at 18:00
  • [This](https://wiki.umn.edu/CSCI1901/InstallingMITScheme) is the cleanest instruction I've found so far. No need to install anything else. Although it says Mountain Lion, it works for me (Lion 10.7.5). In fact it would work for any mac on Intel processor. – xysun Sep 01 '13 at 15:35
  • @Timeless: The second article you referenced ("Installing MIT Scheme on Mac OS X") is now a dead link, i.e., "UMWiki Retired June 30, 2016." So, it's even more out of date. :-) – EJ Mak Oct 23 '17 at 17:56

10 Answers10

85

UPDATED FOR EL CAPITAN:

The best way that I've found was from here:

  1. Download either the 32-bit or 64-bit dmg file for Scheme.
  2. Double click the .dmg file, and you'll get this window, in which you should drag the "MIT/GNU Scheme" file into the Applications folder.
  3. For the 32-bit version, run this command:

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

    Then enter your administrator password, and run this command:

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

    For the 64-bit version, first run this command:

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

    Then enter your administrator password and run this command:

    sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/local/bin/scheme
    

And that's it! Now you should be able to use MIT Scheme in your terminal by typing "scheme" into the command line:

Alex K
  • 8,269
  • 9
  • 39
  • 57
41

Homebrew makes it easy for you. On Terminal, type:

ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) ; brew install mit-scheme

Done!

Edit

The install script has been moved:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ; brew install mit-scheme
nalzok
  • 14,965
  • 21
  • 72
  • 139
Johan Kotlinski
  • 25,185
  • 9
  • 78
  • 101
  • Hmm, yes sorry. Homebrew has some prerequisites: https://github.com/mxcl/homebrew/wiki/Installation – Johan Kotlinski Sep 07 '12 at 17:21
  • Anyway, running this worked just fine for me and afterwards it launches with 'mit-scheme' :) – Johan Kotlinski Sep 07 '12 at 17:57
  • hi,i got this error:Failed executing: etc/make-liarc.sh --disable-debug --prefix=/usr/local/Cellar/mit-scheme/9.1.1 --mandir=/usr/local/Cellar/mit-scheme/9.1.1/share/man (mit-scheme.rb:39) any idea...thanks. – Timeless Sep 07 '12 at 18:37
  • @null The error is due to differences in Xcode versions. If you have the latest Xcode installed, running `brew update` would work IMO. However, if you don't have Xcode, then we both are on the same boat! – Kashyap Sep 26 '12 at 07:42
  • 3
    Careful ! The install script has moved from http://raw.github.com/mxcl/homebrew/go to http://raw.github.com/mxcl/homebrew/go/install ! – lenybernard Nov 22 '13 at 17:39
  • If you already installed homebrew, then just need `brew install mit-scheme` – ugoa Aug 26 '14 at 05:59
  • ```ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"``` – kamalbanga Oct 14 '14 at 12:10
  • 4
    This answer no longer works. mit-scheme now needs the hombrew/x11 tap AND a very inconvenient install of xquartz. At least on 10.10. – Gregory Arenius Aug 09 '15 at 02:01
  • 1
    brew cask install xquartz && brew install mit-scheme – wintermute Oct 26 '17 at 05:35
41

For Yosemite 10.10.3:

After installing X11.app and homebrew,

$ brew tap homebrew/x11
$ brew install mit-scheme

I found it easier when a maintained package manager such as homebrew covers all the dependency and build stuff.


Edit: simply

$ brew install mit-scheme

would do. X11 is now optional instead of dependence. There is still an --with-x11 option which requires whole Xcode.

Virgil Ming
  • 549
  • 4
  • 12
22

You can install scheme using homebrew using the following command

brew install mit-scheme
tysonjh
  • 1,329
  • 1
  • 12
  • 27
  • 2
    Note that `mit-scheme` requires XQuartz (X11.app), and that XQuartz is no longer distributed with OSX past Mountain Lion. To install `mit-scheme` through homebrew, you will need to install XQuartz first, else an error will stop the install. You can download and install XQuartz from their [site](http://xquartz.macosforge.org/landing/) yourself, or check out the [cask extension for homebrew](http://caskroom.io/), through which you can install XQuartz. – Ziewvater Dec 23 '14 at 15:35
10

If you have the latest version of Mac system, El Capitan 10.11.2, You might need to do something different than above.

The first command will be same. For the 64-bit version, first run this command:

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

Then enter your administrator password and run this command:

sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/local/bin/scheme

Note: The difference is you need to put local between /usr/ and /bin/

Type scheme in the terminal to see if it works. If you get the following screenshot, that means you succeed it.

Success Result

You definitely need to put local there. The reason is this, Apple improved OS security in OSX 10.10 (rootless), and changes to the general system-wide binaries (such as /usr/bin) is not permitted.

nalzok
  • 14,965
  • 21
  • 72
  • 139
leoflower
  • 563
  • 7
  • 13
6

If you are having trouble with the accepted answer from @virgil-ming, try this:

$ brew install Caskroom/cask/xquartz
$ brew install mit-scheme

Same idea, of course, but this got me up and running when brew tap homebrew/x11 responded with multiple conflicts.

As always, remember to brew update then try again when you are having problems, a la Homebrew's troubleshooting guide.

Niko
  • 658
  • 8
  • 14
4

If you are using docker, and I recommend you do:

docker run -it inikolaev/alpine-scheme

will drop you right into a scheme REPL.

3

UPDATE FOR MAC OS HIGH SIERRA:

Worked for me just by executing (if you are using Homebrew):

brew install mit-scheme

Yahya Hussein
  • 8,767
  • 15
  • 58
  • 114
2

If you are using MacPorts, the command is similar to what others have posted for homebrew -

sudo port install mit-scheme

That set me up pretty well on OS X 10.8.5

Shreyas
  • 1,404
  • 16
  • 10
0

I came across a problem that the 10.x versions of the MIT/GNU Scheme do not support Mac OS X 10.11 El Capitan. In fact, it requires Mac OS X 10.13 or higher.

The topmost version supporting older Mac OS X versions is MIT/GNU Scheme 9.2.

Pavlo Maistrenko
  • 187
  • 2
  • 12