strangelights.com

Main F# Site

Edit Edit
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Search
List all versions List all versions
Mono Linux
.

Installing and Using F# On Linux (with Mono)

Installing Mono

For Debian users, use your package manager to get

     mono-runtime 
     mono-gac
     mono-tools
     libmono-winforms2.0-cil
     libmono-system-runtime2.0-cil

You must get the last two packages! Get the packages like this

     apt-get install <package names>

or use Synaptic Package Manager

Getting and Installing F#

Download the latest version of F# from microsoft at: http://fsharp.net

Unzip the distribution file. Then

    cd FSharp-1.9.7.8   (or other)


    chmod u+x install-mono.sh
    chmod +x bin/fsc.exe
    chmod +x bin/fsi.exe


    ./install-mono.sh   

Now follow the instructions to get a copy of mono.snk.

Then rerun install-mono.sh

    ./install-mono.sh   

Look carefully for failures etc.

Using F# Interactive (fsi.exe)

This should start the F# Interactive command line compiler:

        bin/fsi.exe 

You will almost certainly want to add --readline:

        bin/fsi.exe --readline

Using the F# Compiler (fsc.exe)

This should start the F# Interactive command line compiler:

        bin/fsc.exe 

FAQ

Why is mono.snk required?

This is required because FSharp.Core.dll is strong-named with a .NET release key. Mono treats these DLLs using special rules, and the DLL must be strong-named with the Mono key. This doesn't affect the logical identity of the DLL.

The install-mono.sh script tells you where to get a copy of mono.snk.

Why does the F# compiler (fsc.exe) take a while to compile an empty file?

This is because the compiler is not pre-compiled using Mono's AOT. You can try running AOT on FSharp.Compiler.dll as follows

        mono --aot FSharp.Compiler.dll

If this succeeds, fsc.exe and fsi.exe startup times will be faster.

Why does the F# interactive (fsi.exe) take a while to respond to first input?

This is for the same reason.

Why do I get a "Missing System.Runtime.Remoting.dll" error?

You must install these mono packages:

     libmono-winforms2.0-cil
     libmono-system-runtime2.0-cil

If you don't, you will get a "missing System.Runtime.Remoting.dll" exception, among others.

I always get "warning FS0000: Could not determine highest installed .NET framework version from Registry keys, using version 2.0"

This is a known problem with F# 1.9.7.8. No workaround is possible short of post-filtering the output of the compiler.

Law and legal studies school | Online Natural science School | biology degree | Online chemistry degree | Online Nursing degree

Welcome to F Sharp Wiki, view the HomePage

This site supports the new NoFollow anti-spam initiative.

Recent Topics

Copyright 2005, Robert Pickering (Others where credited) | Terms of Use