How to install gcc and mono on Linux
From Grid-Appliance Wiki
Contents |
What are gcc and Mono
gcc is a compiler system produced by the GNU Project supporting various programming languages. mono provides a .NET-compatible set of tools in Linux, including a C# compiler and a Common Language Runtime.
Ubuntu
We need to install three packages, which are all available for ubuntu distributions after 8.10 (inclusive): mono-gmcs, libmono-system-runtime2.0-cil and gcc. But for the package "libmono-posix2.0-cil" in Ubuntu 9.04, it is included in a larger package called "libmono2.0-cil" in Ubuntu 8.10. So this leads to slight difference between two distributions.
Ubuntu 9.04
sudo apt-get install gcc mono-gmcs libmono-system-runtime2.0-cil sudo apt-get install libmono-posix2.0-cil
This installs mono version 2.0.1
Ubuntu 8.10
sudo apt-get install gcc mono-gmcs libmono-system-runtime2.0-cil sudo apt-get install libmono2.0-cil
This installs mono version 1.9.1
Ubuntu 8.04 and previous versions
We recommend you to upgrade your OS. Otherwise, you need to download and install mono from source.
Debian
Debian 5.0
For basic Debian 5.0, we need to add a source repository in aptitude
suThis requires you to input your user password, and then do the following:
echo "deb http://ftp.us.debian.org/debian lenny main" >> /etc/apt/sources.list apt-get update apt-get install gcc mono-gmcs libmono-system-runtime2.0-cil exit
This installs mono version 1.9.1.
CentOS
CentOS 5.X
First, get gcc:
su -c "yum install gcc"
Second, to get mono version 1.9.1, you need to download a separate repo file, and then install from yum.
wget http://download.opensuse.org/repositories/Mono/RHEL_5/Mono.repo su -c "mv Mono.repo /etc/yum.repos.d/" su -c "yum --enablerepo=Mono install mono-core mono-web"
This installs mono version 1.9.1.
OpenSUSE
OpenSUSE 11.X KDE
zypper install gcc mono-core mono-web
This installs gcc and mono version 1.9.1
OpenSUSE 10.3 KDE and previous versions
You can install gcc from yum:
sudo zypper install gcc
You need to download and install mono from source.
Download and install mono from source
This has some dependencies bison, glib2-devel
If you have any problem in installing mono in above ways, you can install mono by downloading and installing from source. This process takes some time to complete:
wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.2.tar.bz2 tar jvxf mono-2.2.tar.bz2 cd mono-2.2/ ./configure make su -c "make install" su -c "echo /usr/local/lib >> /etc/ld.so.conf.d/mono.conf" su -c "ldconfig"
This installs mono version 2.2.

