我们知道,在 Ubuntu 9.10 操作系统中可以使用以下命令来安装 MonoDevelop 2.0:
$ sudo apt-get install monodevelop
但是,如果我们需要安装最新的 MonoDevelop 2.2 版本的话,可以按照以下步骤从源代码进行编译:
[email protected]:~$ cd src
[email protected]:~/src$ svn co svn://anonsvn.mono-project.com/source/trunk/monodevelop
[email protected]:~/src$ cd monodevelop
[email protected]:~/src/monodevelop$ ./configure --prefix=/opt/monodevelop-2.2
The build profile ‘default‘ does not exist. A new profile will be created.
Select the packages to include in the build for the profile ‘default‘:
1. [X] main
2. [ ] extras/JavaBinding
3. [ ] extras/BooBinding
4. [ ] extras/ValaBinding
5. [ ] extras/AspNetEdit
6. [ ] extras/GeckoWebBrowser
7. [ ] extras/WebKitWebBrowser
8. [ ] extras/MonoDevelop.Database
9. [ ] extras/MonoDevelop.Profiling
10. [ ] extras/MonoDevelop.AddinAuthoring
11. [ ] extras/MonoDevelop.CodeAnalysis
12. [ ] extras/MonoDevelop.Debugger.Mdb
13. [ ] extras/MonoDevelop.Debugger.Gdb
14. [ ] extras/PyBinding
15. [ ] extras/MonoDevelop.IPhone
Enter the number of an add-in to enable/disable,
(q) quit, (c) clear all, (s) select all, or ENTER to continue:
==========> 这里省略了很多输出行 <==========
Configuration summary
* Installation prefix = /opt/monodevelop-2.2
* C# compiler = /usr/bin/gmcs
* Mono class library development extensions: yes
* Version control support: yes
* Providers:
* Subversion: yes
* C/C++ project support: yes
* Platform bindings: GNOME
* Unit tests: no
* Mozilla location:
Now type `make‘ to compile MonoDevelop
Configuration Summary
---------------------
MonoDevelop has been configured with
prefix = /opt/monodevelop-2.2
profile = default
Packages included in the build:
main
[email protected]:~/src/monodevelop$ make
[email protected]:~/src/monodevelop$ echo ‘cd ~/src/monodevelop; make run &‘ > monodevelop-2.2
[email protected]:~/src/monodevelop$ chmod +x monodevelop-2.2
[email protected]:~/src/monodevelop$ sudo mv monodevelop-2.2 /usr/local/bin
这就 OK 了。使用 monodevelop-2.2 运行,效果如下图所示:
另外, Monoxide experimental Mono packages PPA 网站提供最新版本的 MonoDevelop 的 apt 安装源。
(maintained by official Debian/Ubuntu Mono team)
This PPA should be used for testing changes to the Mono stack, pre-release package versions, etc.
让我们来试试吧:
首先,使用以下命令:
$ sudo vi /etc/apt/sources.list
在软件源中加入以下几行:
然后使用以下命令来安装 MonoDevelop:
[email protected]:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23DC003A
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 23DC003A
gpg: 下载密钥‘23DC003A’,从 hkp 服务器 keyserver.ubuntu.com
gpg: 密钥 23DC003A:公钥“Launchpad PPA for directhex”已导入
gpg: 没有找到任何绝对信任的密钥
gpg: 合计被处理的数量:1
gpg: 已导入:1 (RSA: 1)
[email protected]:~$ sudo apt-get update
[email protected]:~$ sudo apt-get install monodevelop
这就 OK 了。使用 monodevelop 命令,或者点击“应用程序 -> 编程 -> Monodevelop”菜单项运行,版本信息如下图所示:
可以看出,这个版本还是 2.2 Beta 2 版,相信不久的将来就可以用 sudo apt-get upgrade 命令升级到 2.2 RC 版。 :)
版权声明:本文为博主http://www.zuiniusn.com原创文章,未经博主允许不得转载。