Getting Mono

Introduction

There are different ways to get Mono installed on your system, depending on your profile and usage of Mono.

In order of difficulty:

Installers

If your intent is to run applications that depend on the stable (1.2.x) on the Linux (x86), MacOS X (Power PC) or Windows platforms, you will want to use the installers found on the Downloads page.

Please note that on Linux, this doesn't integrate as nicely with the platform and will not work if the applications you intend to run are distributed as RPMs (http://www.rpm.org/).

Package Management Systems

Introduction

To deal with package installation, removal and dependencies, many Unix systems (Linux, MacOS X, ...) rely on Package Management Systems such as RPM, Red Carpet, Yum, Deb, Portage, Fink, DarwinPorts. Beyond the core libraries and runtime (such as Mono) many applications are distributed using those systems. Since it's likely you'll use such a system to install the application you'll be running and its dependencies (including Mono). Let's quickly review what systems are available:

RPM

On RPMs based Linux distributions (RedHat, Novell SUSE and Mandriva) most applications are delivered as RPMs (RPM Package Manager). When installing an application via RPM, this package management system is able to check that all dependencies for the application are present.

For example, our Gtk# bindings require the Gtk+ libraries (as well as many others); the RPM system will make sure that the RPM for Gtk+ has been installed. Also, when RPM is used to remove a package (application or library), it removes packages that depend on that package. For example if I chose to remove the gtk+ package, it will also remove the Gtk# package (and monodoc since it depends on Gtk#, and MonoDevelop which in turns depends on monodoc...)

If you choose to install the packages yourself, go to the Mono dowload page at Downloads and select the distribution you are running on.

Packages are split up by functionality, download all the packages for the functionality you require. If you are experimenting for the first time, we suggest that you download the zip file that contains all of the individual packages (they are in the file `mono-all.zip').

If you choose the `mono-all.zip' file, you must decompress the archive first:

$ unzip mono-all.zip

To install, just use the rpm command as the root user:

# rpm -Uvh *rpm

An RPM primer

The basic RPM commands are:

  • to install (update) an RPM
$ rpm -Uvh <rpm file>
  • to check if an RPM is installed
$ rpm -q <rpm-name>
  • to get information on an RPM package from its file
$ rpm -qpi <rpm-file>
  • to get information on an RPM package that has been installed
$ rpm -qi <rpm-name>
  • to get a list of files in an RPM package
$ rpm -qlp <rpm-file>
  • to get a list of dependencies of an RPM package
$ rpm -qp --requires <rpm-file>
  • to get a list of packages that depend on this rpm package
$ rpm -q --whatrequires <rpm-name>

This should be enough to get you going.

Red Carpet

RPM is very good at telling you what depencies are missing but finding the RPM for that missing dependency is often a difficult task. Red Carpet (now Novell Zenworks for Linux) was created to remedie this. It is based on the RPM system but provides a database of dependencies for each supported distribution. Red Carpet is also capable of keeping your up to date with the latest release of software.

After installing Red Carpet (ftp://ftp.novell.com/pub/ximian/redcarpet2/) for your distribution (Mono is included in the Novell SUSE Pro, NLD, SLES, Fedora Core 3 and Redhat 9.0, RHEL 3.0 and RHEL 4.0 channels) you will be able to use the graphical client or the commmand line client to install mono, its components and dependencies (as well as be kept up to date with the latest versions):

rug sa http://go-mono.com/download
rug sub mono-1.1-official
rug sub gtk-sharp-official
rug in mono-complete gtk-sharp

Yum

Yum, another RPM compatible system is found in Fedora based distributions and can be used to install Mono and dependencies. On Fedora Core 3, Putting the mono.repo (http://www.go-mono.com/download/fedora-3-i386/mono.repo) file in /etc/yum.repos.d will allow you to install mono and related packages.

Deb and Portage

Other package management systems exist that are not RPM based. Mono can be usually found in Debian (http://pkg-mono.alioth.debian.org/) (Debian, Ubuntu distributions) and Portage (http://www.gentoo-portage.com/dev-lang/mono) (Gentoo) systems. This package system are not compatible with RPM based system and won't interact with it. If you have installed Mono with it, you will not be able to install an application via RPM that depends on Mono being installed.

Fink and DarwinPorts (Mac OS X)

Most Mono applications packaged for OS X, depend an installation of Mono via the Mono installer for Mac OS X. Installers are currently in developent that package Gtk# (and dependencies) and MonoDevelop (http://monodevelop.com). However, it is possible to install Mono using a linux style package system manager such as Fink (http://fink.sourceforge.net/) (Debian/apt-get based) or DarwinPorts (http://www.darwinports.org).

From Source

Why build from source ?

There are many reasons why someone would want to build Mono from source. Building from source allows you to:

  • Build Mono on a system that Mono is not packaged for
  • Build components that are not currently packaged
  • Contribute to Mono and its components
  • Test a patch
  • Run Mono's regression test suite
  • Run the sample code found in the source
  • Live on the bleeding edge (SVN)
  • Live on the bleeding edge once a day (Snapshots)

Note that as of 4/2005 several componenents are only available via SVN or source tarballs such as monocov.

Once you obtain the source code to Mono via the Downloads page, a snapshot (http://mono.ximian.com/monobuild/snapshot/) or SVN, you will need to compile and install it.

tarballs

Found on the Downloads page, tarballs (.tgz) contains the source code for a given release of Mono and components. This is the safest way to build from source as the code contained in the tarballs is known to build on all supported platforms and run the regression test suite.

Snapshots

Snapshots (http://mono.ximian.com/monobuild/snapshot/) tarballs contain a nightly SVN extract of the following modules:

  • mono
  • mcs
  • gtk-sharp
  • xsp


Bleeding Edge (SVN)

Mono uses the Subversion (http://subversion.tigris.org/) source code control system for all of its source code. Although only active contributors get write access to the repository, third party developers and casual users can use our anonymous SVN repository to access the source code as well.

SVN will let you access the latest version of the source code, up to the minute as contributors commit their work. While code found in SVN usually builds, some portions of the components might fail to work.

Contributors

Erik Dasque, Valentin Sawadski