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:

apt-get purge mono-*

Install some dependencies

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

Create a temp directory for downloading mono files

cd /root

mkdir -p install/mono

Get and install latest libgdiplus:

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

cd libgdiplus

./autogen.sh --prefix=/usr

make

make install

Get and install lates Mono:

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

Get and install latest XSP 3.x

cd /root/install/mono

git clone <a href="git://github.com/mono/xsp.git" rel="nofollow">git://github.com/mono/xsp.git</a>

cd xsp

./autogen.sh --prefix=/usr

make

make install

Test the installation

You should test if the installation was a success:

Check if mono was installed:

which mono

Check the version of mono

mono --version

Check the version of fastcgi

fastcgi-server-mono4 /version

Hope you have successfully installed mono on your Ubuntu machine!


JOIN OUR NEWSLETTER

Join my newsletter for FREE! Be one of thousands of people that receive ONE mail per week with the coolest posts of the week! JUMP IN don't be shy!!

We hate spam. Your email address will not be sold or shared with anyone else.

Author: Rocko

Share This Post On

6 Comments

  1. Thank you, I was having some problems with the installation. Now it works perfectly :)

    Post a Reply
  2. Thanx man.
    libtiff4 libtiff4-dev must be changed on libtiff5 libtiff5-dev for Ubuntu 14.04

    Post a Reply
  3. To get exactly version 3.4 (not the latest build)
    after commands
    >git clone git://github.com/mono/mono.git
    >cd mono
    must be executed
    >git checkout 954ed3c91edeb8e22e336d7e7c9ad1a83a779f61

    Post a Reply
  4. I get a “cmake not found” error when doing “./autogen.sh –prefix=/usr”, can you help me? :/

    Post a Reply

Leave a Reply / Comment / Opinion :)

%d bloggers like this: