特殊:Badtitle/NS100:MonoFromSource:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的1个中间版本) | |||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/MonoFromSource}} | {{From|https://help.ubuntu.com/community/MonoFromSource}} | ||
{{Languages|UbuntuHelp:MonoFromSource}} | {{Languages|UbuntuHelp:MonoFromSource}} | ||
=== | === Introduction === | ||
Due to the current lag between Mono releases and Ubuntu/Debian packages being available, this page will help you to compile the latest release of Mono from source. | Due to the current lag between Mono releases and Ubuntu/Debian packages being available, this page will help you to compile the latest release of Mono from source. | ||
These instructions are for use with Ubuntu 5.04 (Hoary Hedgehog), Ubuntu 5.10 forwards already has a more recent version of Mono in the repositories. | These instructions are for use with Ubuntu 5.04 (Hoary Hedgehog), Ubuntu 5.10 forwards already has a more recent version of Mono in the repositories. | ||
第59行: | 第59行: | ||
bash:~/src/$ mono -V | bash:~/src/$ mono -V | ||
Mono JIT compiler version 1.1.9, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com | Mono JIT compiler version 1.1.9, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com | ||
TLS: normal | TLS: normal | ||
GC: Included Boehm (with typed GC) | GC: Included Boehm (with typed GC) | ||
SIGSEGV : normal | SIGSEGV : normal | ||
Globalization: normal | Globalization: normal | ||
</nowiki></pre> | </nowiki></pre> | ||
=== Gtk# === | === Gtk# === | ||
第108行: | 第108行: | ||
bash:~/src/$ sudo ldconfig | bash:~/src/$ sudo ldconfig | ||
bash:~/src/$ mono gtk-sharp-2.3.91/sample/GtkDemo/GtkDemo.exe | bash:~/src/$ mono gtk-sharp-2.3.91/sample/GtkDemo/GtkDemo.exe | ||
</nowiki></pre> | |||
=== XSP === | |||
XSP is a small server to run asp.net pages. It's a component need to run asp.net pages under Apache. | |||
Retrive the source from mono web sites. I recommend you get the same version for XSP than mono. | |||
<pre><nowiki>wget http://go-mono.com/sources/xsp/xsp-XXX.tar.bz2 | |||
</nowiki></pre> | |||
Extract hte content of this archive with this command. | |||
<pre><nowiki>tar jxf xsp* | |||
</nowiki></pre> | |||
Compile it and install it with this command. | |||
<pre><nowiki>cd xsp* | |||
./configure | |||
make | |||
sudo make install | |||
</nowiki></pre> | |||
=== mod_mono === | |||
Notes : To correctly running mod_mono, you must install XSP. | |||
Install this extra dependecies. | |||
<pre><nowiki>sudo apt-get install apache2 apache2-prefork-dev | |||
</nowiki></pre> | |||
Retrive the source from mono web sites. I recommend you get the same version for XSP than mono. | |||
<pre><nowiki>wget http://go-mono.com/sources/mod_mono/mod_mono-1.2.6.tar.bz2 | |||
</nowiki></pre> | |||
Extract hte content of this archive with this command. | |||
<pre><nowiki>tar jxf mod_mono* | |||
</nowiki></pre> | |||
Compile it and install it with this command | |||
<pre><nowiki>cd mod_mono* | |||
./configure | |||
make | |||
sudo make install | |||
</nowiki></pre> | </nowiki></pre> | ||
=== Conclusion === | === Conclusion === |
2008年4月23日 (三) 11:48的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/MonoFromSource }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/af | • {{#if: UbuntuHelp:MonoFromSource|Afrikaans| [[::MonoFromSource/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/ar | • {{#if: UbuntuHelp:MonoFromSource|العربية| [[::MonoFromSource/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/az | • {{#if: UbuntuHelp:MonoFromSource|azərbaycanca| [[::MonoFromSource/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/bcc | • {{#if: UbuntuHelp:MonoFromSource|جهلسری بلوچی| [[::MonoFromSource/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/bg | • {{#if: UbuntuHelp:MonoFromSource|български| [[::MonoFromSource/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/br | • {{#if: UbuntuHelp:MonoFromSource|brezhoneg| [[::MonoFromSource/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/ca | • {{#if: UbuntuHelp:MonoFromSource|català| [[::MonoFromSource/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/cs | • {{#if: UbuntuHelp:MonoFromSource|čeština| [[::MonoFromSource/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/de | • {{#if: UbuntuHelp:MonoFromSource|Deutsch| [[::MonoFromSource/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/el | • {{#if: UbuntuHelp:MonoFromSource|Ελληνικά| [[::MonoFromSource/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/es | • {{#if: UbuntuHelp:MonoFromSource|español| [[::MonoFromSource/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/fa | • {{#if: UbuntuHelp:MonoFromSource|فارسی| [[::MonoFromSource/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/fi | • {{#if: UbuntuHelp:MonoFromSource|suomi| [[::MonoFromSource/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/fr | • {{#if: UbuntuHelp:MonoFromSource|français| [[::MonoFromSource/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/gu | • {{#if: UbuntuHelp:MonoFromSource|ગુજરાતી| [[::MonoFromSource/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/he | • {{#if: UbuntuHelp:MonoFromSource|עברית| [[::MonoFromSource/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/hu | • {{#if: UbuntuHelp:MonoFromSource|magyar| [[::MonoFromSource/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/id | • {{#if: UbuntuHelp:MonoFromSource|Bahasa Indonesia| [[::MonoFromSource/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/it | • {{#if: UbuntuHelp:MonoFromSource|italiano| [[::MonoFromSource/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/ja | • {{#if: UbuntuHelp:MonoFromSource|日本語| [[::MonoFromSource/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/ko | • {{#if: UbuntuHelp:MonoFromSource|한국어| [[::MonoFromSource/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/ksh | • {{#if: UbuntuHelp:MonoFromSource|Ripoarisch| [[::MonoFromSource/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/mr | • {{#if: UbuntuHelp:MonoFromSource|मराठी| [[::MonoFromSource/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/ms | • {{#if: UbuntuHelp:MonoFromSource|Bahasa Melayu| [[::MonoFromSource/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/nl | • {{#if: UbuntuHelp:MonoFromSource|Nederlands| [[::MonoFromSource/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/no | • {{#if: UbuntuHelp:MonoFromSource|norsk| [[::MonoFromSource/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/oc | • {{#if: UbuntuHelp:MonoFromSource|occitan| [[::MonoFromSource/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/pl | • {{#if: UbuntuHelp:MonoFromSource|polski| [[::MonoFromSource/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/pt | • {{#if: UbuntuHelp:MonoFromSource|português| [[::MonoFromSource/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/ro | • {{#if: UbuntuHelp:MonoFromSource|română| [[::MonoFromSource/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/ru | • {{#if: UbuntuHelp:MonoFromSource|русский| [[::MonoFromSource/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/si | • {{#if: UbuntuHelp:MonoFromSource|සිංහල| [[::MonoFromSource/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/sq | • {{#if: UbuntuHelp:MonoFromSource|shqip| [[::MonoFromSource/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/sr | • {{#if: UbuntuHelp:MonoFromSource|српски / srpski| [[::MonoFromSource/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/sv | • {{#if: UbuntuHelp:MonoFromSource|svenska| [[::MonoFromSource/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/th | • {{#if: UbuntuHelp:MonoFromSource|ไทย| [[::MonoFromSource/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/tr | • {{#if: UbuntuHelp:MonoFromSource|Türkçe| [[::MonoFromSource/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/vi | • {{#if: UbuntuHelp:MonoFromSource|Tiếng Việt| [[::MonoFromSource/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/yue | • {{#if: UbuntuHelp:MonoFromSource|粵語| [[::MonoFromSource/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/zh | • {{#if: UbuntuHelp:MonoFromSource|中文| [[::MonoFromSource/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/zh-hans | • {{#if: UbuntuHelp:MonoFromSource|中文(简体)| [[::MonoFromSource/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:MonoFromSource | UbuntuHelp:MonoFromSource | {{#if: | :}}MonoFromSource}}/zh-hant | • {{#if: UbuntuHelp:MonoFromSource|中文(繁體)| [[::MonoFromSource/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:MonoFromSource|:MonoFromSource|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :MonoFromSource/zh | | {{#ifexist: MonoFromSource/zh | | {{#ifeq: {{#titleparts:MonoFromSource|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:MonoFromSource|1|-1|}} | zh | | }}
Introduction
Due to the current lag between Mono releases and Ubuntu/Debian packages being available, this page will help you to compile the latest release of Mono from source. These instructions are for use with Ubuntu 5.04 (Hoary Hedgehog), Ubuntu 5.10 forwards already has a more recent version of Mono in the repositories.
Pre-Requisites
Since we're going to be compiling code, we need to satisfy some requirements before we begin. We also need to satisfy some dependencies for Mono.
bash:~$ sudo apt-get install build-essential pkg-config libglib2.0-dev bison libcairo1-dev
Now we're going to need somewhere to work:
bash:~$ mkdir src bash:~$ cd src
libgdiplus
Optional - Although the following are not required, they do provide more functionality to libgdiplus.
bash:~/src/$ sudo apt-get install libungif4-dev libjpeg62-dev libtiff4-dev
Let's grab the tarball:
bash:~/src/$ wget http://www.go-mono.com/sources/libgdiplus-1.1/libgdiplus-1.1.9.tar.gz
...and extract it:
bash:~/src/$ tar xzf libgdiplus-1.1.9.tar.gz bash:~/src/$ cd libgdiplus-1.1.9
Now we can compile and install it:
bash:~/src/libgdiplus-1.1.9/$ ./configure --prefix=/usr/local bash:~/src/libgdiplus-1.1.9/$ make bash:~/src/libgdiplus-1.1.9/$ sudo make install
Now we have to make sure the installed libraries are visible - there are several ways to do this, this is just one.
bash:~/src/libgdiplus-1.1.9/$ sudo sh -c "echo /usr/local/lib >> /etc/ld.so.conf" bash:~/src/libgdiplus-1.1.9/$ sudo /sbin/ldconfig
Now we can leave this folder...
bash:-~/src/libgdiplus-1.1.9/$ cd ..
...and move onto the next step.
Mono
Compiling Mono itself is pleasantly straightforward:
bash:~/src/$ wget http://www.go-mono.com/sources/mono-1.1/mono-1.1.9.tar.gz bash:~/src/$ tar xzf mono-1.1.9.tar.gz bash:~/src/$ cd mono-1.1.9 bash:~/src/mono-1.1.9/$ ./configure --prefix=/usr/local --with-preview=yes bash:~/src/mono-1.1.9/$ make bash:~/src/mono-1.1.9/$ sudo make install bash:~/src/$ cd ..
You can check the install as follows:
bash:~/src/$ mono -V Mono JIT compiler version 1.1.9, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV : normal Globalization: normal
Gtk#
There are two variants of Gtk# - 1.x and 2.x. Different applications may require one or the other, and due to the nature of Mono there is no harm in having both. Both depend on various GNOME/GTK+ development libraries, which can be satisified as follows:
bash:~/src/$ sudo apt-get install libgnome-desktop-dev libgtkhtml3.2-dev
There are also optional dependencies, which - if you require them - can be satisified with:
bash:~/src/$ sudo apt-get install libgnomedb2-dev librsvg2-dev libvte-dev
As with Mono itself once you've satisfied the dependencies, compilation is straight forward.
1.x
bash:~/src/$ wget http://go-mono.com/sources/gtk-sharp/gtk-sharp-1.0.10.tar.gz bash:~/src/$ tar xzf gtk-sharp-1.0.10.tar.gz bash:~/src/$ cd gtk-sharp-1.0.10 bash:~/src/gtk-sharp-1.0.10/$ ./configure --prefix=/usr/local bash:~/src/gtk-sharp-1.0.10/$ make bash:~/src/gtk-sharp-1.0.10/$ sudo make install bash:~/src/$ cd ..
You can test your install with the following:
bash:~/src/$ sudo ldconfig bash:~/src/$ mono gtk-sharp-1.0.10/sample/GtkDemo/GtkDemo.exe
2.x
Gtk# 2.x has an additional dependency:
bash:~/src/$ sudo apt-get install libpanel-applet2-dev
bash:~/src/$ wget http://go-mono.com/sources/gtk-sharp-2.0/gtk-sharp-2.3.91.tar.gz bash:~/src/$ tar xzf gtk-sharp-2.3.91.tar.gz bash:~/src/$ cd gtk-sharp-2.3.91 bash:~/src/gtk-sharp-2.3.91/$ ./configure --prefix=/usr/local bash:~/src/gtk-sharp-2.3.91/$ make bash:~/src/gtk-sharp-2.3.91/$ sudo make install bash:~/src/$ cd ..
You can test your install with the following:
bash:~/src/$ sudo ldconfig bash:~/src/$ mono gtk-sharp-2.3.91/sample/GtkDemo/GtkDemo.exe
XSP
XSP is a small server to run asp.net pages. It's a component need to run asp.net pages under Apache. Retrive the source from mono web sites. I recommend you get the same version for XSP than mono.
wget http://go-mono.com/sources/xsp/xsp-XXX.tar.bz2
Extract hte content of this archive with this command.
tar jxf xsp*
Compile it and install it with this command.
cd xsp* ./configure make sudo make install
mod_mono
Notes : To correctly running mod_mono, you must install XSP. Install this extra dependecies.
sudo apt-get install apache2 apache2-prefork-dev
Retrive the source from mono web sites. I recommend you get the same version for XSP than mono.
wget http://go-mono.com/sources/mod_mono/mod_mono-1.2.6.tar.bz2
Extract hte content of this archive with this command.
tar jxf mod_mono*
Compile it and install it with this command
cd mod_mono* ./configure make sudo make install
Conclusion
You've now got a fully functioning Mono/Gtk# environment, and you can move onto compiling/developing your own applications!