11

I recently found myself needing to build Mono 3.0 for CentOS 6, with a request from my infrastructure guy to otherwise keep the system as close to CentOS as possible (i.e. no 3rd-party packages if possible).

Because there are currently no Mono 3.0 RPMs that I could find, I went through the exercise of building it from scratch, on a clean Minimal install of CentOS 6.3.

It is possible to build Mono 3.0 with no external packages on CentOS 6.3.

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Matt Mills
  • 8,692
  • 6
  • 40
  • 64

2 Answers2

10

Perform a CentOS 6.3 Minimal Install

ifup eth0

yum -y update
yum -y install glib2-devel
yum -y install libpng-devel
yum -y install libjpeg-devel 
yum -y install giflib-devel 
yum -y install libtiff-devel 
yum -y install libexif-devel 
yum -y install libX11-devel 
yum -y install fontconfig-devel 
yum -y install gettext 
yum -y install make 
yum -y install gcc-c++

# amusing hack to fix the mono make file

export echo=echo

# build libgdiplus
curl -O http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.9.tar.bz2
bunzip2 libgdiplus-2.10.9.tar.bz2
tar xvf libgdiplus-2.10.9.tar
cd libgdiplus-2.10.9
./configure --prefix=/usr/local
make
make install

# build mono
curl -O http://download.mono-project.com/sources/mono/mono-3.0.0.tar.bz2
bunzip2 mono-3.0.0.tar.bz2
tar xvf mono-3.0.0.tar
cd mono-3.0.0
./configure --prefix=/usr/local
make
make install

# tell binfmt how to launch CLR executables
echo ':CLR:M::MZ::/usr/local/bin/mono:' > /proc/sys/fs/binfmt_misc/register
Ty W
  • 6,694
  • 4
  • 28
  • 36
Matt Mills
  • 8,692
  • 6
  • 40
  • 64
6

Timotheus Pokorra Mono Repository

Use tpokorra repository with mono 3.2.5 for Centos 6.x (and other distros)

Yum repository configuration

Put file mono.repo in directory /etc/yum.repos.d/ with content:

[home_tpokorra_mono]
name=mono and monodevelop (CentOS_CentOS-6)
type=rpm-md
baseurl=http://download.opensuse.org/repositories/home:/tpokorra:/mono/CentOS_CentOS-6/
gpgcheck=1
gpgkey=http://download.opensuse.org/repositories/home:/tpokorra:/mono/CentOS_CentOS-6/repodata/repomd.xml.key
enabled=1

Installation

yum install mono-opt

More

http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=mono-opt

MariuszS
  • 30,646
  • 12
  • 114
  • 155