Results 1 to 4 of 4

Thread: Installing Mono 2.8 on Ubuntu via shell script

  1. #1
    Join Date
    Oct 2010
    Location
    Attleboro, MA
    Beans
    275

    Installing Mono 2.8 on Ubuntu via shell script

    I have a shell script on my computer that will download and install Mono 2.8 on Ubuntu. I'm just wondering if it's safe to use.

    Why do I want to do this? To use C# and ASP.NET 4.0.

    Here's the contents of the script:

    Code:
    #!/bin/bash
    
    TOPDIR=$(pwd)
    BUILDDIR=$TOPDIR/build
    DLDDIR=$TOPDIR/downloads
    
    export PATH=/usr/local/bin:$PATH
    
    
    echo "updating existing system"
    sudo apt-get update
    sudo apt-get upgrade -y
    
    echo "installing prerequisites"
    sudo apt-get install -y build-essential libc6-dev g++ gcc libglib2.0-dev pkg-config subversion apache2 apache2-threaded-dev bison gettext autoconf automake libtool libpango1.0-dev libatk1.0-dev libgtk2.0-dev libtiff4-dev libgif-dev libglade2-dev
    
    mkdir -p $BUILDDIR
    
    echo
    echo "downloading mono packages"
    echo
    
    cd $BUILDDIR
    
    wget http://ftp.novell.com/pub/mono/sources/xsp/xsp-2.8.tar.bz2
    wget http://ftp.novell.com/pub/mono/sources/mod_mono/mod_mono-2.8.tar.bz2
    wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.8.tar.bz2
    wget http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.8.tar.bz2
    wget http://ftp.novell.com/pub/mono/sources/gtk-sharp212/gtk-sharp-2.12.10.tar.bz2
    
    cd $BUILDDIR
    bunzip2 -df xsp-2.8.tar.bz2
    tar -xvf xsp-2.8.tar
    
    bunzip2 -df mod_mono-2.8.tar.bz2
    tar -xvf mod_mono-2.8.tar
    
    bunzip2 -df mono-2.8.tar.bz2
    tar -xvf mono-2.8.tar
    
    bunzip2 -df libgdiplus-2.8.tar.bz2
    tar -xvf libgdiplus-2.8.tar
    
    bunzip2 -df gtk-sharp-2.12.10.tar.bz2
    tar -xvf gtk-sharp-2.12.10.tar
    
    echo
    echo "building and installing mono packages"
    echo
    
    
    cd $BUILDDIR
    cd libgdiplus-2.8
    ./configure --prefix=/usr/local
    make
    sudo make install
    
    cd $BUILDDIR
    cd mono-2.8
    ./configure --prefix=/usr/local
    make
    sudo make install
    
    cd $BUILDDIR
    cd gtk-sharp-2.12.10
    ./configure --prefix=/usr/local
    make
    sudo make install
    
    cd $BUILDDIR
    cd xsp-2.8
    ./configure --prefix=/usr/local
    make
    sudo make install
    
    cd $BUILDDIR
    cd mod_mono-2.8
    ./configure --prefix=/usr/local
    make
    sudo make install
    cd $BUILDDIR
    
    echo
    echo "done"
    My current Mono installation is setup like this (according to whereis /usr/bin/mono /etc/mono /usr/lib/mono /usr/lib64/mono /usr/share/mono
    Use what works out best for you, whether it be Windows, Mac OS X or Linux. It isn't rocket science.

    No longer active here.

  2. #2
    Join Date
    Oct 2006
    Location
    /dev/null
    Beans
    1,574
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Installing Mono 2.8 on Ubuntu via shell script

    Just keep in mind that you will have two GACs - e.g. GTK# apps won't run for you anymore if they try to use /usr/local/bin/mono but that mono install has no GTK# in its GAC
    Understanding is a three-edged sword: Your side, their side, and the truth

  3. #3
    Join Date
    Oct 2010
    Location
    Attleboro, MA
    Beans
    275

    Re: Installing Mono 2.8 on Ubuntu via shell script

    So, what you're saying is in order to continue using Banshee (the only Mono app I currently have installed other than MonoDevelop and an incredibly basic WebKit browser I made in MonoDevelop that lacks a GUI and over 90% of the functionality a browser has due to it only having 12 lines of code total) I'll need to use the Mono installed in /usr/bin/mono as my default Mono runtime, right?
    Use what works out best for you, whether it be Windows, Mac OS X or Linux. It isn't rocket science.

    No longer active here.

  4. #4
    Join Date
    Oct 2006
    Location
    /dev/null
    Beans
    1,574
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Installing Mono 2.8 on Ubuntu via shell script

    Quote Originally Posted by Quadunit404 View Post
    So, what you're saying is in order to continue using Banshee (the only Mono app I currently have installed other than MonoDevelop and an incredibly basic WebKit browser I made in MonoDevelop that lacks a GUI and over 90% of the functionality a browser has due to it only having 12 lines of code total) I'll need to use the Mono installed in /usr/bin/mono as my default Mono runtime, right?
    Both Banshee and MonoDevelop will use the mono executable in $PATH.

    Your best bet (something I've never bothered with since I don't support unpackaged Mono) is to duplicate /usr/share/cli-common/runtimes.d/mono as something like mono28, with fixed paths to make it relevant to your /usr/local install - then run dpkg-reconfigure mono-gac. That should install all libraries from the system GAC into your self-built GAC, now and automatically in the future.
    Understanding is a three-edged sword: Your side, their side, and the truth

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •