Friday, March 16, 2012

Install latest mono from github on Ubuntu Server

Friday, March 16, 2012 Posted by Andre Broers , , , 9 comments
Next example is installing the latest version of mono (the master from the github repository) on our new cloned ubuntu server. I will install the latest (2.11 at this time) because I wan’t to experiment with the dotnet 4.5 async stuff which is allready in this version. I will show some demos in next blogs. But first we have to install the latest mono.

First install the necessary dependencies
me@ubuntu01:~$ sudo apt-get install git autoconf libtool automake gettext pkg-config mono-gmcs

Change to your home directory
me@ubuntu01:~$ cd ~

Clone the mono repository from git to the directory monosrc which will be created
me@ubuntu01:~$ git clone git://github.com/mono/mono.git monosrc

Build and install the mono distribution
me@ubuntu01:~$ cd monosrc
me@ubuntu01:~/monosrc$ ./autogen.sh --prefix=$HOME/mono
me@ubuntu01:~/monosrc$ make
me@ubuntu01:~/monosrc$ make install

Now we have to set the path in out profile
me@ubuntu01:~/monosrc$ cd ..
me@ubuntu01:~$ vi .profile

Add the following line to the end of the .profile.
PATH="$HOME/mono/bin:$PATH"

This will make your new installed mono the default for your login.
Now reload the altered profile
me@ubuntu01:~$ . ./.profile

Mind the first point. If you forget the first one. The PATH will not get updated.

Now you can start mcs, the compiler (which defaults to dotnet 4.5 profile) and mono the runtime.
me@ubuntu01:~$ mcs --version
Mono C# compiler version 2.11.0.0
me@ubuntu01:~$ mono --version
Mono JIT compiler version 2.11 (master/41b91a2 Fri Mar 16 22:04:12 CET 2012)
Copyright (C) 2002-2011 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
me@ubuntu01:~$

9 comments:

  1. [...] In this post I will show an async example that runs in Visual Studio 11 beta  and in the latest Mono. The first demo is in Visual [...]

    ReplyDelete
  2. i used your instructions but the version i 'm having is 2.10.8.1
    did i miss something?

    ReplyDelete
  3. Did you checked out the master branch. You probably checked out the wrong version.

    ReplyDelete