Linux HOWTOs

About | Home | Search


HOWTO: mono
Description: Free implementation of .NET
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# Mono
# ====
# As I write this, the latest "stable" release according to the web site
# is 1.2.6 and the latest "legacy" release is 1.0.6

# If you want to uninstall libgdiplus or Mono, or clean up files from an
# old version before installing a new one, skip down to the bottom for
# instructions.

# Make sure that you install any Mono-based apps into the same prefix that
# you use for Mono itself (otherwise you'll have a /usr/lib/mono and a
# /usr/local/lib/mono mess...)


# libgdiplus 1.2.6
# ================
# Prerequisites:
# pkg-config
# cairo
# libtiff
# libjpeg
# libungif
# libpng
# XFree86 or X.org
# freetype2
# zlib

cd
test -f installed/libgdiplus-1.2.6.tar.bz2 &&
 mv installed/libgdiplus-1.2.6.tar.bz2 .
test ! -f libgdiplus-1.2.6.tar.bz2 &&
 wget http://ftp.novell.com/pub/mono/sources/libgdiplus/\
libgdiplus-1.2.6.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "libgdiplus-*" -exec rm -r {} \;
tar xjvf ~/libgdiplus-1.2.6.tar.bz2
cd libgdiplus-1.2.6
test $UID = 0 && chown -R root:root .
./configure
make

# Become root to install it
su

# Install it
rm -f /usr/local/lib/libgdiplus.*
make install
ldconfig

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/libgdiplus-*.tar.*
mv libgdiplus-1.2.6.tar.bz2 installed/


# Mono 1.2.6
# ==========
# Prerequisites:
# pkg-config
# Glib-2.0 >= 1.3.11
# libgdiplus (above; optional)

cd
test -f installed/mono-1.2.6.tar.bz2 &&
 mv installed/mono-1.2.6.tar.bz2 .
test ! -f mono-1.2.6.tar.bz2 &&
 wget http://ftp.novell.com/pub/mono/sources/mono/mono-1.2.6.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "mono-*" -exec rm -r {} \;
tar xjvf ~/mono-1.2.6.tar.bz2
cd mono-1.2.6
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make

# Become root to install it
su

# Install it
rm -f /usr/local/lib/libmono.*
make install
ldconfig

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/mono-*.tar.*
mv mono-1.2.6.tar.bz2 installed/


# If you ever want to uninstall libgdiplus, this should do it:
cd
su
test -d src/libgdiplus-* && ( cd src/libgdiplus-* ; make uninstall )
rm -r /usr/local/lib/libgdiplus.* /usr/local/lib/pkgconfig/libgdiplus.pc
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libgdiplus-*" -exec rm -r {} \;
rm -f ~/installed/libgdiplus-*.tar.*

# If you ever want to uninstall mono, this should do it:
# (if you don't have the source, extract it and run configure, then 'make
# uninstall' will work)
cd
su
test -d src/mono-* && ( cd src/mono-* ; make uninstall )
test -d /etc/mono && rm -r /etc/mono
test -d /usr/include/mono && rm -r /usr/include/mono
test -d /usr/lib/mono && rm -r /usr/lib/mono
test -d /usr/share/jay && rm -r /usr/share/jay
test -d /usr/share/libgc-mono && rm -r /usr/share/libgc-mono
test -d /usr/share/mono && rm -r /usr/share/mono
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "mono-*" -exec rm -r {} \;
rm -f ~/installed/mono-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>