Update Mono on Ubuntu
This page is intended to give detailed instructions for updating (downloading and compiling) MONO on Ubuntu. Most of the information has been provided by DEVARTHUR in his blog site.
These directions have been generalised where appropriate in an attempt to make them future proof. Where you see the release you need to substitute the release level you wish to install e.g. "2.4.3".
Firstly you need to make sure you have all the prerequisites which are:
You can use your favourite package manager (aptitude, apt-get, Synaptic, etc.) to do this e.g.:
apt-get install autoconf build-essential binfmt-support bison gawk gettext libglib2.0-dev mono-common pkg-config swig
Next you need to download the appropriate version of Mono sources. These are held by Novell in .tar.bz2 format. To see all available releases just type the following into an Internet Browser:
To download the source code first change directory to the receiving structure e.g.:
Now get and unpack the sources:
tar xf mono-release.tar.bz2
Where release is the desired version, so to get version 2.4.3 this would read:
tar xf mono-2.4.3.tar.bz2
This creates a new directory mono-release under the current directory and this is where the compile is run from so change to this directory:
Now configure, compile and install the new version. For the "make" commands you will need Root privileges, so either change to Root user or use the sudo option:
sudo make install
Both "make" statements take some time and produce lots of chatter to the screen, don't worry about it. Any errors are likely to be due to missing prerequisites but it kindly tells you which ones at the end of the step.
Lastly you need a symlink to let binfmt-support execute mono executeables directly from the shell:
ln -s /usr/local/bin/mono /usr/bin/cli
If you get a report that the file already exists that is OK, it just means that a previous release of mono was installed.
To verify that the new version of mono is now live issue the command:
This will tell you the current live version.