How to get F# working with Mono?

  1. Go here and download fsharp.zip
  2. Unzip it and open the created folder
  3. Open the terminal and run ./install-mono.sh as root (On some systems, it is necessary to convert the newline characters in that script from CRLF to LF)

This will give you the basic functionality which means you will be able to run "mono fsi.exe" and compiled F# apps as "mono myApp.exe".

Usefull tips:

  1. It makes sense to create scripts for the compiler and F# interactive. i.e.:

    /usr/local/bin/fsc

    #!/bin/sh exec /usr/bin/mono /usr/local/src/FSharp-1.9.9.9/bin/fsc.exe $@

    /usr/local/bin/fsi

    #!/bin/sh exec /usr/bin/mono /usr/local/src/FSharp-1.9.9.9/bin/fsi.exe $@

  2. F# interactive (fsi.exe) is trying to reference System.Windows.Forms by default so in order to run it WinForms support in Mono will be required

  3. fsi.exe works better in Xterm than in Gnome Terminal.


For reference, there are now Linux (.deb and .rpm) packages and a Mac OS X installer available at http://fsxplat.codeplex.com/ which will save you the work of having to manually copy around files and make your own launcher scripts.