Install Mono 2.8 or 2.10 parallel environment on Ubuntu

I have updated by popular 2.6/2.8 script to support mono 2.10. Get it while it’s hot!

https://github.com/firegrass/mono-installer-script

Usage: mono_build.sh [-v version] [-p prefix] [-m gitmodules] [-i] [-s] [-t]

Command line options

  -v   specify version of mono

  -p   specify prefix to install

  -m   specify git modules to build [ libgdiplus llvm mono gtk-sharp xsp mod_mono mono-basic
       mono-addins gtkmozembed-sharp webkit-sharp gluezilla gnome-sharp gnome-desktop-sharp
       mono-tools debugger monodevelop]

  -i   Interactive mode, pause between each modules make and make install. Allows skipping of modules

  -u   Do not update source code, just build

  -b   Do not build, just update source code

  -c   Clean git before building

Example

  mono_build.sh -v 2.6 -p ~/mono -m libgdiplus mono gtk-sharp mono-tools

15 comments

  1. Hi there…

    I have a problem – I do this

    ./mono_build.sh -v 2.10 -p ~/mono libgdiplus mono gtk-sharp mono-tools

    and yet I get the error “-bash: ./mono_build.sh: Permission denied”.

    Any ideas?

  2. I do this :

    wget –no-check-certificate https://github.com/firegrass/mono-installer-script/raw/master/mono_build.sh
    chmod 755 mono_build.sh
    ./mono_build.sh -v 2.10 p ~/mono -m libgdiplus llvm mono gtk-sharp xsp mod_mono mono-basic mono-addins gtkmozembed-sharp webkit-sharp gnome-sharp gnome-desktop-sharp mono-tools

    And the script failed for xsp…

    /bin/bash /home/sylvain/mono-src/xsp/install-sh -d
    /usr/bin/install -c -m 644 Mono.WebServer.zip Mono.WebServer.tree Mono.WebServer.source
    /usr/bin/install: target `Mono.WebServer.source’ is not a directory
    make[3]: *** [install-data-local] Error 1
    make[3]: Leaving directory `/home/sylvain/mono-src/xsp/docs/Mono.WebServer’
    make[2]: *** [install-am] Error 2
    make[2]: Leaving directory `/home/sylvain/mono-src/xsp/docs/Mono.WebServer’
    make[1]: *** [install-recursive] Error 1
    make[1]: Leaving directory `/home/sylvain/mono-src/xsp/docs’
    make: *** [install-recursive] Error 1
    – ERROR: xsp failed, press enter to continue

    Any idea ?

    Thx

  3. @Sylvain:

    Not sure, I will test and get back to you

    You can test yourself by doing something like…

    cd ~/mono-src/xsp
    git pull
    source mono-2.10-environment
    ./configure --prefix=~/mono
    make
  4. sylvain@ubuntu:~/mono-src/xsp$ git pull
    Already up-to-date.

    [mono-2.10] ~/mono-src/xsp @ ./configure –prefix=~/mono
    configure: error: expected an absolute directory name for –prefix: ~/mono

    without that, the build works

    but what to do next ?

    (newbie in mono and installation under linux)

    Thanks :)

  5. Hi Patrick,

    Thank you for this script, it will be very useful.
    Used the script for a first-time install of mono 2.10.

    1. At the end of the script it recommends:
    To start a mono-2.10 environment, run: source mono-2.10-env
    I think this should be:
    source mono-2.10-environment

    2. It looks as if monodevelop has a dependency on Mono.Addins

    mono-2.10 monodevelop

    gives an error
    Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756′ or one of its dependencies.
    File name: ‘Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756′
    Missing method get_IsInitialized in assembly /usr/lib/monodevelop/bin/MonoDevelop.exe, type Mono.Addins.AddinManager

  6. Sorry to post ANOTHER message, but I found the something with coincidence in the mono_build.sh

    I added
    INSTALLATION_DIR=/opt/mono-2.10/lib/monodoc/sources

    in:
    /mono-src-$VERSION/xsp/docs/makefile.am

    I used
    cd ~/mono-src/xsp
    git pull
    source mono-2.10-environment
    ./configure –prefix=/home/melroy/mono-src/mono
    make

    But still the same error :( as above.

  7. I just want to say thank you!

    I’ve been using Ubuntu or Debian for a while and have been looking forward to ASP.Net development. Yours is the first approach I’ve encountered that worked without an associated nightmare of tuning and fiddling.

    Thanks for all your hard work!
    Dale E. Moore

  8. Bless you sir. I have been annoyed at being stuck on Mono 2.4, and I’m hopeful that you’ve gotten me past that roadblock. Since about 85% of my development targets Mono, I’ve felt like I was being denied the opportunity to use — or even learn — the more recent C# features. So it’s great to have this easy-to-run way of getting the parallel installation up and running. Thanks so much.

  9. I downloaded and ran your script on Ubuntu 10.10

    I get the following error:
    user@ubuntu1010desktop:~/Desktop$ sh mono_build.sh -v 2.8 -a
    mono_build.sh: 103: [[: not found
    mono_build.sh: 103: 2.8: not found
    mono_build.sh: 103: 2.8: not found
    mono_build.sh: 103: 2.8: not found
    – Error: Only master, 2.10, 2.8, 2.6 versions supported

    Any ideas?

  10. if I try

    $ source mono-2.10-environment
    $ mono-2.10 mono -V
    Mono JIT compiler version 2.6.7 (Debian 2.6.7-3ubuntu1)

    any idea ?

    Regards

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>