Mono 2.10 Install Script for Ubuntu & Fedora

Update 10/4/2011 – I’m starting to consolidate the major version posts. This script refers to 2.10.1; however, it installs 2.10 latest. Refer to the current 2.10 post for more info.

I just updated the bash install script for Mono 2.10. Thanks to @Marv for the Ubuntu script and heads up that 2.10 was released. This script is mainly intended for use with linux/apache web servers. It will install Mono, GTK, OpenGDI, XSP, and Mod_Mono. For Mono Develop, read through the Building Mono Develop page [], which will require a few additional packages not included in this script.

To install for Ubuntu:

wget --no-check-certificate
chmod 755


To install for Fedora:

yum install wget
wget --no-check-certificate
chmod 755


Again, if setting up a web server, be sure to set the VirtualHost environment up correctly with PATH & LD_LIBRARY_PATH. (here, IOMAP is optional) See configuring virtual hosts. The following line should be included in your VirtualHost configuration.

MonoSetEnv site_name MONO_IOMAP=all;PATH=/opt/mono-2.10/bin:$PATH;LD_LIBRARY_PATH=/opt/mono-2.10/lib:$LD_LIBRARY_PATH;


Update – March 15, 2011

I’m refactoring some stuff, so bare with me. Today I’m introducing a totally re-written script that will hopefully make it easier to adapt to updates in the future. So far, I’ve treated these bash scripts like I do Windows batch files. But I took some time and tried to learn a little more about writing bash scripts.  The new scripts will stop if any errors are encountered. This is good and bad.  Good because now you know something went wrong, and the errors are much easier to find. Bad (maybe) because now you know something might not have worked. ;) Anyway, I hope the changes will help everyone.

I’ve changed all the prefixes to use the major/minor version. So 2.10.1, 2.10.2 etc, will use prefix /opt/mono-2.10. You’ll always have the option to change that if you wish to use a different prefix. There’s a single variable in the beginning of the script that sets the prefix.

Finally, there does seem to be a problem at the end of installing xsp. However, everything seems to go in okay.

Good luck!


UPDATE – March 8, 2011

Mono 2.10.1 was released Feb 25th. I updated the install script for 2.10 to use the Mono 2.10.1 package. (That was the only package updated in this version). I’ve also included an experimental upgrade script for 2.10 to 2.10.1 here. (fedora vs ubuntu use the same script). Download it to the same location of your script for 2.10 and run it.  It will uninstall just mono-2.10 and then download, compile, and re-install the new mono-2.10.1.


103 thoughts on “Mono 2.10 Install Script for Ubuntu & Fedora

  1. you don’t need to install complete apache, just apache dev libs, to compile the mod_mono … as well, many people have prefork installed and your script would remove it … not good, please make that optional

  2. @Anatoliy Belsky
    Thanks Anatoliy. My intentions for this script is to provide an easy way for me to setup web servers. I realize that apache isn’t required, but I like it being there for my own use and for some of the supporting blog posts I’ve written to help folks break into using Mono for ASP.NET. Feel free to modify and use it however you like. It should be no trouble to remove apache from the install command.

  3. Hi Nathan, I am getting the following error while I install mono 2.10.1 and above.

    make[1]: Entering directory `/build/mod_mono-2.10/src’
    /bin/sh ../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/local/apache2/include -Wall -DDFLT_MONO_CONFIG_DIR=\”/usr/local/apache2/conf/mod-mono-applications\” -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -MT mod_mono_la-mod_mono.lo -MD -MP -MF .deps/mod_mono_la-mod_mono.Tpo -c -o mod_mono_la-mod_mono.lo `test -f ‘mod_mono.c’ || echo ‘./’`mod_mono.c
    libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/usr/local/apache2/include -Wall -DDFLT_MONO_CONFIG_DIR=\”/usr/local/apache2/conf/mod-mono-applications\” -g -O2 -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -g -O2 -pthread -I/usr/local/apache2/include -MT mod_mono_la-mod_mono.lo -MD -MP -MF .deps/mod_mono_la-mod_mono.Tpo -c mod_mono.c -fPIC -DPIC -o .libs/mod_mono_la-mod_mono.o
    mod_mono.c: In function âapache_get_useridâ:
    mod_mono.c:389: error: âunixd_configâ undeclared (first use in this function)
    mod_mono.c:389: error: (Each undeclared identifier is reported only once
    mod_mono.c:389: error: for each function it appears in.)
    mod_mono.c: In function âapache_get_groupidâ:
    mod_mono.c:399: error: âunixd_configâ undeclared (first use in this function)
    mod_mono.c: In function âapache_get_usernameâ:
    mod_mono.c:409: error: âunixd_configâ undeclared (first use in this function)
    mod_mono.c: In function âensure_dashboard_initializedâ:
    mod_mono.c:488: warning: implicit declaration of function âunixd_set_global_mutex_permsâ
    mod_mono.c: In function âconnection_get_remote_portâ:
    mod_mono.c:854: warning: implicit declaration of function âapr_sockaddr_port_getâ
    mod_mono.c:854: error: âconn_recâ has no member named âremote_addrâ
    mod_mono.c: In function âsend_initial_dataâ:
    mod_mono.c:1981: error: âconn_recâ has no member named âremote_ipâ
    mod_mono.c:2029: error: âconn_recâ has no member named âremote_ipâ
    make[1]: *** [mod_mono_la-mod_mono.lo] Error 1
    make[1]: Leaving directory `/build/mod_mono-2.10/src’
    make: *** [install-recursive] Error 1

    Please help me to resolve this error.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>