Jump to content

Building Mono: Difference between revisions

From fCraft Wiki
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 10: Line 10:
=Installation=
=Installation=
==== Download the sources for the latest version of Mono ====
==== Download the sources for the latest version of Mono ====
  wget http://download.mono-project.com/sources/mono/mono-2.10.8.tar.bz2
  wget http://download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2
 
==== Unpack the archive ====
==== Unpack the archive ====
  tar xjf mono-2.10.8.tar.bz2
  tar xjf mono-2.10.9.tar.bz2
  cd mono-2.10.8
  cd mono-2.10.9
 
==== Configure the build process ====
==== Configure the build process ====
  ./configure --prefix=/opt/mono --with-sgen=yes --with-sgen
  ./configure --prefix=/opt/mono --with-sgen=yes --with-sgen
(If you do not wish to install mono into a separate folder, replace /opt/mono with /usr/local)


==== Build the sources ====
==== Build the sources ====
  make
  sudo make


==== Install mono to target directory ====
==== Install mono to target directory ====
This part takes a while...
This part takes a while...
  sudo make install
  sudo make install
Mono should now be installed in /opt/mono directory. Add /opt/mono to your $PATH, or create appropriate symlinks.
Mono should now be installed in /opt/mono directory.  
Add <code>/opt/mono/bin</code> to your $PATH, and <code>/opt/mono/lib</code> to your $LD_LIBRARY_PATH.
 
export PATH=$PATH:/opt/mono/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mono/lib
 
If you set prefix to <code>/usr/local</code>, you don't need to mess with $PATH.


==== Check installation ====
==== Check installation ====
  mono --version
  mono --version

Latest revision as of 17:52, 11 April 2012

Prerequisites

Please note, some of these packages may not be strictly required, but the lists should be sufficient.

Debian / Ubuntu

sudo apt-get update
sudo apt-get install gcc libtool bison pkg-config gettext make bzip2 g++ wget

Fedora / CentOS / RedHat

yum update -y
yum install -y make automake glibc-devel gcc-c++ gcc bison pkgconfig gettext-libs autoconf libtool wget

Installation

Download the sources for the latest version of Mono

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

Unpack the archive

tar xjf mono-2.10.9.tar.bz2
cd mono-2.10.9

Configure the build process

./configure --prefix=/opt/mono --with-sgen=yes --with-sgen

(If you do not wish to install mono into a separate folder, replace /opt/mono with /usr/local)

Build the sources

sudo make

Install mono to target directory

This part takes a while...

sudo make install

Mono should now be installed in /opt/mono directory. Add /opt/mono/bin to your $PATH, and /opt/mono/lib to your $LD_LIBRARY_PATH.

export PATH=$PATH:/opt/mono/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mono/lib

If you set prefix to /usr/local, you don't need to mess with $PATH.

Check installation

mono --version