Alex Rivera | Logout

Install Mono and Monodevelop on CentOS 5.x/6.x

Asked 2013-06-03T15:39:30.760
11

I am trying to install Mono and Monodevelop on a CentOS 5.9 environment.

I have tried the following instructions, with no luck.

http://fealves78.blogspot.co.uk/2012/08/install-mono-and-monodevelop-on-centos.html

Can anyone suggest an alternative to the the above link.

Edit
Report

1 Answer

2

On these systems, I typically install Mono from source. It is a bit more work but you do not have to rely on dated or broken packages that may or may not be maintained.

The instructions below were tested on CentOS 5.9.

Because of limitations in the installed versions of Glib and GTK+, the newest version of GTK# you can compile on RHEL5 (CentOS 5.x) is 2.10.4. With this version of GTK#, the newest version of MonoDevelop that you can build is 2.0 (not even 2.2).

You can still run very recent versions of Mono though. I have CentOS 5.x boxes serving up ASP.NET MVC3 apps.

Head over to /usr/src as root

su
cd /usr/src

Ensure GCC and friends are installed (to build the Mono source code)

yum install gcc gcc-c++ libtool bison autoconf automake

Grab and unpack the Mono source code

wget http://download.mono-project.com/sources/mono/mono-3.0.7.tar.bz2
tar -xvjf mono-3.0.7.tar.bz2

Build and install Mono

cd mono-3.0.7
./configure --prefix=/usr
make && make install

Verify that you have a working Mono installation with mono --version and mcs --version

Build the GDI+ compatibility layer (required for System.Drawing)

yum install glib2-devel libX11-devel pixman-devel fontconfig-devel freetype-devel libexif-devel libjpeg-devel glib2-devel libtif-devel libpng-devel giflib-devel

cd /usr/src
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
tar -xvjf libgdiplus-2.10.tar.bz2
answered 2013-06-04T05:01:44.537

Your Answer