Ubuntu 7.04 Feisty FawnにMono 1.2.6をインストールしたときの手順。 Feisty Fawnでパッケージからインストールできるバージョンは1.2.1と若干古いので、ソースからインストールした。 またインストール先は/usr/localとした。
Monoコアライブラリのインストール
Monoを使用する上で最低限必要なライブラリのインストール。
必要なパッケージ
コンパイル時に必要となるパッケージをあらかじめSynapticないしはapt-getでインストールしておく。 必要になるものは以下のパッケージ。
- libgdiplusが必要とするもの
- libglib2.0-dev
- libungif4-dev
- libjpeg62-dev
- libtiff4-dev
- libexif-dev
- Monoが必要とするもの
- bison
- 共通して必要とするもの
- pkg-config
- build-essential
libgdiplus
wget http://go-mono.com/sources/libgdiplus/libgdiplus-1.2.6.tar.bz2
tar -xvf libgdiplus-1.2.6.tar.bz2
cd libgdiplus-1.2.6/
./configure --prefix=/usr/local
configureした結果で依存関係に問題(noと表示される箇所)がないことを確認する。
Configuration summary * Installation prefix = /usr/local * Cairo = internal * Text = cairo * EXIF tags = yes * Codecs supported: - TIFF: yes - JPEG: yes - GIF: yes - PNG: yes NOTE: if any of the above say 'no' you may install the corresponding development packages for them, rerun autogen.sh to include them in the build.
問題が無ければ、make、make installする。
make
sudo make install
Mono
wget http://go-mono.com/sources/mono/mono-1.2.6.tar.bz2
tar -xvf mono-1.2.6.tar.bz2
cd mono-1.2.6/
./configure --prefix=/usr/local
configureの結果例。
mcs source: $(top_srcdir)/mcs olive source: GC: included TLS: __thread SIGALTSTACK: yes Engine: Building and using the JIT 2.0 Beta: yes 2.1 Alpha: no JNI support: IKVM Native libgdiplus: assumed to be installed zlib: system zlib
configureに成功したら、make make installする。
make
sudo make install
インストールが完了したら、mono -Vでmonoが動作することを確認する。
# mono -V Mono JIT compiler version 1.2.6 (tarball) Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC) SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none
またgacutil -lでアセンブリがGACに登録されていることを確認する。
# gacutil -l The following assemblies are installed into the GAC: : System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 :
mono-basicのインストール
Mono用Visual Basic .NETコンパイラのインストール。
mono-basic
wget http://go-mono.com/sources/mono-basic/mono-basic-1.2.6.tar.bz2
tar -xvf mono-basic-1.2.6.tar.bz2
cd mono-basic-1.2.6/
./configure
configureの結果を確認する。
mono-basic 1.2.6 module configure to use prefix=/usr/local
問題が無ければ、make、make installする。
make
sudo make install
インストールが完了したら、gacutil -lでアセンブリ(Microsoft.VisualBasic)がGACに登録されていることを確認する。
: Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : :
また、vbnc /?でvbnc(Visual Basic .NETコンパイラ)が動作することを確認する。
Visual Basic.Net Compiler version 0.0.0.5850 Copyright (C) 2004-2007 Rolf Bjarne Kvinge. All rights reserved. : :
その他のアセンブリのインストール
他のMonoアプリケーションが必要とするアセンブリのインストール。
必要なパッケージ
コンパイル時に必要となるパッケージをあらかじめSynapticないしはapt-getでインストールしておく。 必要になるものは以下のパッケージ。
- gtk-sharpが必要とするもの
- libglade2-dev
- libpango1.0-dev
- libgtk2.0-dev
- libcairo2-dev
- gnome-sharpが必要とするもの
- libgnome2-dev
- libgnome-desktop-dev
- libgnome-menu-dev
- libgnomecanvas2-dev
- libgnomeui2-dev
- libgnomeprint2.2-dev
- libgnomeprintui2.2-dev
- libgnomedb2-dev
- libgsf-1-dev
- librsvg2-dev
- libtool
- libgtkhtml3.8-dev
- libvte-dev
- libpanel-applet2-dev
- gtksourceview-sharpが必要とするもの
- libgtksourceview-dev
monodoc
wget http://go-mono.com/sources/monodoc/monodoc-1.2.6.zip
unzip monodoc-1.2.6.zip
cd monodoc-1.2.6/
./configure
make
sudo make install
GtkSharp
http://go-mono.com/sources/gtk-sharp210/gtk-sharp-2.10.2.tar.bz2
tar -xvf gtk-sharp-2.10.2.tar.bz2
gtk-sharp-2.10.2/
./configure
configureした結果で依存関係に問題(noと表示される箇所)がないことを確認する。
Configuration summary * Installation prefix = /usr/local * C# compiler: /usr/local/bin/mcs -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GTK_SHARP_2_10 Optional assemblies included in the build: * glade-sharp.dll: yes * gtk-dotnet.dll: yes NOTE: if any of the above say 'no' you may install the corresponding development packages for them, rerun autogen.sh to include them in the build. * Documentation build enabled: yes
問題が無ければ、make、make installする。
make
sudo make install
Mono Addins
wget http://go-mono.com/sources/mono-addins/mono-addins-0.3.tar.bz2
tar -xvf mono-addins-0.3.tar.bz2
cd mono-addins-0.3/
./configure
configureの結果を確認する。
Configuration summary * Installation prefix = /usr/local * gui support: yes * unit tests: no
問題が無ければ、make、make installする。
make
sudo make install
GnomeSharp
wget http://go-mono.com/sources/gnome-sharp2/gnome-sharp-2.16.0.tar.gz
tar -xvf gnome-sharp-2.16.0.tar.gz
cd gnome-sharp-2.16.0/
./configure
configureの結果を確認する。
Configuration summary * Installation prefix = /usr/local * C# compiler: /usr/local/bin/mcs -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 Optional assemblies included in the build: * art-sharp.dll: yes * gnomevfs-sharp.dll: yes * gnome-sharp.dll: yes * rsvg-sharp.dll: yes * gtkhtml-sharp.dll: yes * vte-sharp.dll: yes
問題が無ければ、make、make installする。
make
sudo make install
mono-tools
wget http://go-mono.com/sources/mono-tools/mono-tools-1.2.6.tar.bz2
tar -xvf mono-tools-1.2.6.tar.bz2
cd mono-tools-1.2.6/
./configure
configureの結果を確認する。
Configuration summary * Installation prefix = /usr/local * gecko-sharp.dll = yes
問題が無ければ、make、make installする。
make
sudo make install
GeckoSharp
wget http://go-mono.com/sources/gecko-sharp2/gecko-sharp-2.0-0.12.tar.gz
tar -xvf gecko-sharp-2.0-0.12.tar.gz
cd gecko-sharp-2.0-0.12/
./configure
configureの結果を確認する。
Configuration summary * Installation prefix: /usr/local * compiler: /usr/local/bin/mcs * Documentation: yes (/usr/local/bin/monodocer)
問題が無ければ、make、make installする。
make
sudo make install
gtksourceview-sharp
wget http://go-mono.com/sources/gtksourceview-sharp2/gtksourceview-sharp-2.0-0.11.tar.bz2
tar -xvf gtksourceview-sharp-2.0-0.11.tar.bz2
cd gtksourceview-sharp-2.0-0.11/
./configure
configureの結果を確認する。
Configuration summary * Installation prefix: /usr/local * compiler: /usr/local/bin/mcs * Documentation: yes
問題が無ければ、make、make installする。
make
sudo make install
インストールしたアセンブリのチェック
gacutil -lでコンパイル・インストールしたアセンブリがGACに登録されていることを確認する。
# gacutil -l : gconf-sharp, Version=2.16.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f gconf-sharp-peditors, Version=2.16.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f gdk-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f gecko-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=ccf7d78a55e9f021 glade-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f glib-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f gnome-sharp, Version=2.16.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f gnome-vfs-sharp, Version=2.16.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f gtk-dotnet, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f gtk-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f gtkhtml-sharp, Version=2.16.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f gtksourceview-sharp, Version=1.0.0.2, Culture=neutral, PublicKeyToken=35e10195dab3c99f monodoc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 :
設定ファイルの変更
必要に応じて設定ファイルを変更する。
/etc/ld.so.conf
インストールしたパスを追記。
/usr/local/lib
~/.bashrc
環境変数LD_LIBRARY_PATHを追記。
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH