Tasty big needs etc portage updating use 39 package better grip her

Tuesday, July 10, 2018 by Wade

Option 1: Install from your Linux distribution’s package manager

When being used as .NET language, F# requires a .NET runtime. On Linux this runtime is Mono or .NET Core. Most Linux distributions include a version of Mono in their repositories. However, these versions are typically pretty old. Therefore, it is highly recommended that you add the official Mono package repository to your package manager, as described below. This makes it easy to get updates or uninstall, if required.

Once installed, see installing a smart editor and the Linux and Cross-Platform Development Guide.

Note that the Mono runtime is available for a wide variety of CPU architectures, not just x86 and ARM. All of these support F#.

Ubuntu/Mint

  1. Add the mono repository to your package manager, as detailed here.

  2. Install the package, which will pull in an updated version of Mono, if required.

This installs the F# compiler and the F# interactive .

Debian

  1. Add the mono repository to your package manager, as detailed here.

  2. Install the package, which will pull in an updated version of Mono, if required.

This installs the F# compiler and and the F# intereactive . Please note that the Debian package tends to be less up-to-date than the packages above.

CentOS/RHEL/Amazon/Fedora

  1. Add the mono repository to your package manager, as detailed here
  2. Follow these instructions.

  3. Then install packages and .

This installs the F# compiler and and the F# intereactive .

Gentoo/Sabayon/Funtoo/Calculate

From portage tree:

Alternatively there is an overlay available with current versions of various .NET programs, including F#, FAKE, NuGet and others.

  1. Add the “dotnet” overlay from layman. (If you need to set it up, there is a Manual on the Gentoo site.)

  2. Now you can build F#.

  3. (Optional) There are emacs mode and monodevelop bindings, you can chose what you want by setting use flags alike in following example:

Option 2: Install from source

  1. Get Mono, the cross-platform, open source .NET runtime implementation used by F#. Preferably use a package from your distribution or Xamarin. If this is not possible, install from source by following these instructions.

    Note that if you are installing to a private prefix, follow these instructions and ensure includes the “lib” directory of that prefix location and includes the “lib/pkgconfig” directory of that prefix location, e.g.

  2. Build and install the F# Compiler (open edition) from source. If using a VM or other memory-constrained system, be aware that errors during compilation may be due to insufficient memory (in particular error 137).

    If installing to a different prefix, use the same prefix as for the Mono runtime above.

Other options

Use a Vagrant VM on Windows

To use F# on Linux VMs on Windows, use F# with Vagrant.

Slackware Slackbuild

  1. Get Mono Slackbuild from this page http://slackbuilds.org/repository/14.1/development/mono/ and run :

    ./mono.SlackBuild

  2. Get last FSharp Slackbuild from this page http://slackbuilds.org/repository/14.1/development/fsharp/ and run :

    ./fsharp.SlackBuild

Using Nix on any Linux distribution or Mac OS X

  1. Install Nix if you don’t already have it:

  2. Get F#

  3. You might also like…

Find out more about the Nix package manager and NixOS (the purely functional Linux distribution based on it)

Explore (and contribute to) the collection of .NET applications and libraries in the Nixpkgs GitHub repo


Highly recommended: Install a smart editor

Like other strongly typed languages, F# can benefit tremendously from an editor that has support for the language. This makes smart auto-completion and compiling while you edit possible, which increases the discoverability of features and programmer productivity in general.

Option 1: Visual Studio Code

Visual Studio Code is a free, open source, cross platform source code editor supporting a lot of languages. F# is supported by the Ionide project and is a nice integration.

  1. Install Visual Studio Code for Linux
  2. Press and enter the following to install the Ionide package for VS Code.

You will also need to install the F# packages from Step 1.

Option 2: JetBrains Rider

JetBrains Rider is a cross-platform .NET IDE built using IntelliJ and ReSharper technology. It offers support for .NET and .NET Core applications on all platforms.

  1. Install JetBrains Rider for Linux.
  2. Follow these instructions.
  3. Then install packages , and .

  4. (optional) Install latest .NET Core packages

Get involved!

To help improve this documentation, you can submit an edit to this page. Or to help with Linux packages, consider joining the F# Core Engineering Group.

http://fsharp.org/use/linux/