Friday, March 16, 2012

Install latest mono from github on Ubuntu Server

Friday, March 16, 2012 Posted by Unknown , , ,
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:// monosrc

Build and install the mono distribution
me@ubuntu01:~$ cd monosrc
me@ubuntu01:~/monosrc$ ./ --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.

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
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.
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)