Installing Monodevelop 3 with F# support on Ubuntu
September 6, 2012 § 14 Comments
After much experimentation and digging around on google groups (special thanks to Ibrahim Hadad) I have finally managed to get Monodevelop 3 and F# working together nicely on Ubuntu. These were the steps I took. Your mileage may vary.
(Update: Knocte has suggested a couple of modifications to simplify the process. These are now reflected below.)
1) sudo apt-get install mono-complete libgdiplus git autoconf libtool
2) Install monodevelop using the script from John Ruiz’ blog:
http://blog.johnruiz.com/2012/05/installing-monodevelop-3-on-ubuntu.html
3) Get F# source and compile:
git clone git://github.com/fsharp/fsharp
cd fsharp/
./autogen.sh --prefix=/usr
make
sudo make install
4) Run monodevelop. Go to tools, add-in manager, gallery. Install F# language binding.
5) Enjoy!

If you call “autogen.sh” instead of “configure”, you don’t need to call autoreconf.
Also, if you call “autogen.sh” with the argument “–prefix=/usr” then you don’t need step 4. Much simpler!
You should update the blog post.
Thanks. Should that be
--prefix=/usr/local?No, /usr/local is the default in case you don’t specify a prefix. The reason to put it in /usr is to place it in the same prefix as the default mono install, in order for the install scripts of fsharp to install the DLLs into the proper GAC location.
I see. Thanks for the tips, have updated the post.
Reblogged this on Gigable – Tech Blog.
Reblogged this on Adil Akhter.
I followed the instructions above, however when I open monodevelop and try to compile a simple F# program I get the error “Error: Framework ‘.NETFramework 4.5′ not installed.”
When I go to Edit->Preferences->.NET Runtimes I see that Mono 2.10.8.1 is my default runtime. Is there a reason I’m getting this error or a way to work around it?
Thanks.
I’m afraid I haven’t seen this. Someone else might be able to help, or you can try asking on the F# open source google group.
Thanks a lot, you saved me a lot of time though hopefully it would be easy as it is on Mac.
The following guide is from my little experience created by soulstrip
How we install a parallel Mono Runtime of the latest Mono Runtime , Monodevelop 3.0.3.2 and the functional programming language Fsharp to Ubuntu OS.
1.First install the prerequisites
sudo apt-get install mono-complete libgdiplus git autoconf libtool build-essential
2.Visit Nikita Tsukanov git page and in the pop up menu press install or follow the guide ( link – https://launchpad.net/~keks9n/+archive/monodevelop-latest )
2a)After selecting install from the browser pop up window
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install Monodevelop
3. Download the latest Mono Runtime
git clone git://github.com/mono/mono.git
4.Goto mono folder and run the autogen with the ––prefix which says where the Mono Runtime will be installed
cd mono
sudo ./autogen.sh –prefix=/opt/mono
5.Compile Mono Runtime
make
6.Install Mono Runtime
sudo make install
7.This is the file that it will tell the environment to use the appropriate Mono Runtime
gedit ~/mono-dev-env
and we paste the following script inside the opened file in gedit
#!/bin/bash
MONO_PREFIX=/opt/mono
GNOME_PREFIX=/usr
export DYLD_LIBRARY_FALLBACK_PATH=$MONO_PREFIX/lib: $DYLD_LIBRARY_FALLBACK_PATH
export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$MONO_PREFIX/include:$GNOME_PREFIX/include
export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal
export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig: $GNOME_PREFIX/lib/pkgconfig
export PATH=$MONO_PREFIX/bin:$PATH
8. The Mono-Addins are needed by Monodevelop in order to load properly so we download them using git
git clone git://github.com/mono/mono-addins.git
9.Goto the mono-addins folder and run the autogen in the folder we installed the latest Mono-Runtime
cd mono-addins
sudo ./autogen.sh –prefix=/opt/mono
11.Compile Mono-addins and install
sudo make && sudo make install
12.This is an extra step for installing Fsharp functional programming language
Download using git
git clone git://github.com/fsharp/fsharp.git
13.Goto folder fsharp and run autogen with the ––prefix of latest mono folder
cd fsharp
sudo ./autogen.sh –prefix=/opt/mono
14.Compile Fsharp
make
15.Install FSharp
sudo make install
16.Use the new Enviroment of the latest Mono-Runtime
source ~/mono-dev-env
17. We Run Monodevelop from Unity Menu
18. We choose from the Monodevelop Menu,
-> Tools ->Addin Manager -> Gallery -> Language bindings -> Fsharp Language Binding
19.Notice that if we will create a new Fsharp solution we shall tell Monodevelop where to find the Reference of Fsharp.Core.dll
Add References->Browse to folder which we have git cloned Fsharp
And that’s it!
Happy programming.
Enjoy!
Thanks for posting this but it does demonstrate how utterly ridiculous things are. Nineteen steps “and that’s it”?
We as a community need to make this easier for people otherwise F# is never going to become a popular cross-platform language.
When people can just do
apt-get install monodevelop fsharpwe’ll be getting somewhereCompletely agreed with you here.
But developers are really weird you know? Just try to explain why the fuck Dominique Goudreault’s answer here ( http://stackoverflow.com/questions/13365158/installing-mono-3-0 ) has more votes than my answer? People are really masochist, and don’t like to contribute upstream.
Hahaha. That’s hilarious.