HOW TO: Install Mono 3.4.x on Ubuntu

Some weeks ago I had to install Mono 3.4 on Ubuntu. Sadly in Ubuntu repositories the Mono package is not up to date. In this HOW TO: Install Mono 3.4 on Ubuntu I will show you step by step how I did installed the latest version of Mono.

What is Mono?

As the official site of Mono-project.com describes: “An open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET”

Basically it make possible that C# and .NET programs can be run in any platform for example Ubuntu.

HOW TO Install Mono 3.4 on Ubuntu

I used some forums and sites as references:

  1. http://forums.osgrid.org/viewtopic.php?f=14&t=4625
  2. http://stackoverflow.com/questions/13365158/installing-mono-3-x-3-0-x-and-or-3-2-x

First make sure you have NO mono in your machine:

[code]apt-get purge mono-*[/code]

Install some dependencies

[code]apt-get install libpng3 libpng3-dev libtool libtiff4 libtiff4-dev libexif12 libexif-dev libgif4 libgif-dev libpango1.0-dev libatk1.0-dev libgtk-3-0 libgtk-3-dev bison automake autoconf make gcc gtk-sharp2 build-essential xorg-dev libfreetype6 libfontconfig libfontconfig-dev gettext libglib2.0-dev git libjpeg-dev libjpeg8-dev libjpeg-turbo8-dev[/code]

Create a temp directory for downloading mono files

[code]cd /root

mkdir -p install/mono[/code]

Get and install latest libgdiplus:

[code]git clone https://github.com/mono/libgdiplus.git

cd libgdiplus

./autogen.sh –prefix=/usr

make

make install[/code]

Get and install lates Mono:

[code]cd /root/install/mono

apt-get install mono-gmcs

git clone git://github.com/mono/mono.git

cd mono

./autogen.sh –prefix=/usr

make

make install

[/code]

Get and install latest XSP 3.x

[code]cd /root/install/mono

git clone git://github.com/mono/xsp.git

cd xsp

./autogen.sh –prefix=/usr

make

make install

[/code]

Test the installation

You should test if the installation was a success:

Check if mono was installed:

[code]which mono[/code]

Check the version of mono

[code]mono –version[/code]

Check the version of fastcgi

[code]fastcgi-server-mono4 /version[/code]

Hope you have successfully installed mono on your Ubuntu machine!

Author: Rocko

Share This Post On