Compile Mono from GIT

CentOS has no package for Mono. This will compile Mono from the GIT repository.

Hint
Since this is updated very often it could include some bugs. But in most cases it works great.

Procedure

Get admin rights
su -
Preparation for installation ...
yum install glib2-devel libpng-devel libjpeg-devel giflib-devel libtiff-devel libX11-devel fontconfig-devel bison gettext libtool cairo-devel
Create a new folder where we place the files. You can use the tmp directory for that
mkdir /tmp/sources
cd /tmp/sources

libgdiplus Compilation

Get the libgdiplus sources from GIT
git clone git://github.com/mono/libgdiplus
Enter the new directory
cd libgdiplus
Run autogen
./autogen.sh --prefix=/usr
Compile the sources
make
Solving “libtool: Version mismatch error”
autoreconf -ivf
Install the files
make install
Leave the directory
cd ..

Mono Compilation

Get the Mono sources from GIT
git clone git://github.com/mono/mono.git
Enter the new directory
cd mono
Run autogen
./autogen.sh --prefix=/usr/local
Install and configure gmcs
sudo make get-monolite-latest
cd mcs/class/lib/monolite
cp basic.exe gmcs.exe
cd ../../../..
 
Hint
You can also use apt-get install mono-gmcs for the 4 gmcs steps.
Compile the sources (15 minutes)
If you used sudo make get-monolite-latest use this:
sudo make EXTERNAL_MCS="/tmp/sources/mono/mcs/class/lib/monolite/gmcs.exe"
If you use apt-get install mono-gmcs use this:
sudo make
Install the files
sudo make install

Uninstall

Run the uninstall
sudo make uninstall
remove the source files
rm -rf ~/sources/mono

Additional Information

Installing Mod_Mono and Xsp4 on CentOS 6.3
http://stackoverflow.com/questions/14901271/installing-mod-mono-and-xsp4-on-centos-6-3
http://wiki.phonicuk.com/Installing-Mono-in-CentOS-5-x.ashx


Send feedback on this topic
Copyright (C) 2013-2014 Dominik Schmidt / Holger Hemmecke. All rights reserved.