Mono 2.8 Install Script for Ubuntu & Fedora

I updated both my scripts for Ubuntu and Fedora to download and install the latest 2.8 Mono release.  I’ve also been playing with GTK lately (specifically Pixbufs) and so this script now includes the install for GTK-Sharp. Anyway, you can find the updated scripts on my GitHub snippets project.  Both Fedora and Ubuntu install scripts should succesfully install mod_mono, Xsp, mono core, GTK, and GDIplus at a minimum.

If you have problems running your apps that use the gdi-plus, it could be resolved with a refresh of the DllMap.  Enter "sudo ldconfig"  and then try to re-run your app. Checkout http://www.mono-project.com/DllNotFoundException for more details.

2/20/2011 Update

Mono 2.10 has been released. I added a new install script here. 

1/27/2011 update

Mono 2.8.2 was released awhile back, which included some security fixes and enhancements. I have since posted an updated script along another blog post related to it here. 

10/26/2010 update

The script now installs to /opt/mono-2.8 instead of /usr/local in favor of the parallel mono environment suggestion. You may need to add /opt/mono-2.8/bin to your system PATH.

For Ubuntu, this is located in /etc/environment; insert /opt/mono-2.8/bin to the beginning of the path. Keep in mind, this will change the global PATH, so if your'e using a workstation, this may affect other applications that depend on Mono. Consider changing your profile PATH. (See comments for more details). 

For RH/Fedora, I updated the install script to also create an environment script at: /etc/profile.d to include this mono install to your system path.

Disclaimer: You should only try this script if your'e familiar with the process of compiling packages manually. I'm trying to make it work for MonoDevelop and other files, but it may not work with them in its current state.

Feel free to fork and make changes of your own to the script from GitHub. I'll gladly welcome pull requests containing improvements.

 

Ubuntu:

wget http://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/ubuntu/install_mono-2.8.sh

 

Fedora:

wget http://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/fedora/install_mono-2.8.sh

 

After download:

chmod 755 install_mono-2.8.sh  
./install_mono-2.8.sh

 

If you have previously installed Mono from source, you may want to uninstall it before deleting its source. Run sudo make uninstall from each component directory you previously installed.

 

Just for kicks, here is a snapshot of the full Ubuntu script (Fedora is nearly identical with corresponding  yum package names).

#!/bin/bash

TOPDIR=$(pwd)  
BUILDDIR=$TOPDIR/build  
DLDDIR=$TOPDIR/downloads

export PATH=/opt/mono-2.8/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=/opt/mono-2.8
make  
sudo make install

cd $BUILDDIR  
cd mono-2.8  
./configure --prefix=/opt/mono-2.8
make  
sudo make install

cd $BUILDDIR  
cd gtk-sharp-2.12.10  
./configure --prefix=/opt/mono-2.8
make  
sudo make install

cd $BUILDDIR  
cd xsp-2.8  
./configure --prefix=/opt/mono-2.8
make  
sudo make install

cd $BUILDDIR  
cd mod_mono-2.8  
./configure --prefix=/opt/mono-2.8
make  
sudo make install  
cd $BUILDDIR

echo  
echo "done"

 

comments powered by Disqus