Skip to content
harold edited this page Nov 20, 2011 · 2 revisions

Getting F# up and running on Mac OS X in n easy steps.

Remove any old Mono and F# stuff:

Run this script:

#!/bin/sh -x

#This script removes Mono from an OS X System.  It must be run as root

rm -r /Library/Frameworks/Mono.framework

rm -r /Library/Receipts/MonoFramework-*

for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
   (cd ${dir};
    for i in `ls -al | grep /Library/Frameworks/Mono.framework/ | awk '{print $9}'`; do
      rm ${i}
    done);
done

Also, delete any old F# folders you may have lying around.

Get Mono

  1. Go to: http://www.go-mono.com/mono-downloads/download.html
  2. Click OS X
  3. Click SDK (This should initiate a 110 megabyte download)
  4. Open the .dmg
  5. Open the .pkg inside
  6. Install to the default location

Get FSharp

  1. Go to: http://www.microsoft.com/download/en/details.aspx?id=11100
  2. Click the big download button for: fsharp.zip
  3. Unzip it somewhere nice, and get a terminal into the newly unzipped folder
  4. Run: wget -O mono.snk http://github.com/mono/mono/raw/master/mcs/class/mono.snk
  5. Run: install-mono.sh
  6. Run: mono bin/fsi.exe --gui-
  7. 1+1;;
  8. #quit;;
  9. echo "printfn \"Hi\"" > hello.fs
  10. mono bin/fsc.exe hello.fs
  11. mono hello.exe
  12. Profit?

Clone this wiki locally