ubuntu13.10编译安装mono环境(一)
作者:hebedich 发布时间:2021-03-16 10:13:33
标签:ubuntu,mono
准备工作
一个全新安装的ubuntu13.10系统
下载Mono源代码并编译
nike@NIKE-PC:~$ ls
Desktop Downloads Music Public Videos
Documents examples.desktop Pictures Templates
nike@NIKE-PC:~$ mkdir src
nike@NIKE-PC:~$ cd src
nike@NIKE-PC:~/src$ wget http://download.mono-project.com/sources/mono/mono-3.2.8.tar.bz2
--2014-03-27 21:24:30-- http://download.mono-project.com/sources/mono/mono-3.2.8.tar.bz2
Resolving download.mono-project.com (download.mono-project.com)... 54.240.168.102, 54.230.156.158, 54.230.157.116, ...
Connecting to download.mono-project.com (download.mono-project.com)|54.240.168.102|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 77515552 (74M) [application/x-bzip2]
Saving to: ‘mono-3.2.8.tar.bz2'
100%[======================================>] 77,515,552 189K/s in 10m 50s
nike@NIKE-PC:~/src$ ls
mono-3.2.8.tar.bz2
nike@NIKE-PC:~/src$ tar -xjf mono-3.2.8.tar.bz2
nike@NIKE-PC:~/src$ cd mono-3.2.8/
nike@NIKE-PC:~/src/mono-3.2.8$ ./configure --prefix=/opt/mono-3.2.8
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether ln -s works... yes
checking whether make supports nested variables... yes
checking host platform characteristics... ok
checking for gcc... gcc
checking for gcc... (cached) gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking dependency style of gcc... gcc3
checking for gawk... (cached) mawk
checking whether gcc and cc understand -c and -o together... yes
configure: error: You need to install g++
因为没有安装g++而无法继续:
nike@NIKE-PC:~/src/mono-3.2.8$ sudo apt-get install g++
[sudo] password for nike:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
cpp-4.8 g++-4.8 gcc-4.8 gcc-4.8-base libasan0 libatomic1 libgcc-4.8-dev
libgcc1 libgomp1 libitm1 libquadmath0 libstdc++-4.8-dev libstdc++6
Suggested packages:
gcc-4.8-locales g++-multilib g++-4.8-multilib gcc-4.8-doc libstdc++6-4.8-dbg
gcc-4.8-multilib libmudflap0-4.8-dev libgcc1-dbg libgomp1-dbg libitm1-dbg
libatomic1-dbg libasan0-dbg libtsan0-dbg libbacktrace1-dbg libquadmath0-dbg
libmudflap0-dbg libstdc++-4.8-doc
The following NEW packages will be installed:
g++ g++-4.8 libstdc++-4.8-dev
The following packages will be upgraded:
cpp-4.8 gcc-4.8 gcc-4.8-base libasan0 libatomic1 libgcc-4.8-dev libgcc1
libgomp1 libitm1 libquadmath0 libstdc++6
11 upgraded, 3 newly installed, 0 to remove and 275 not upgraded.
Need to get 25.9 MB of archives.
After this operation, 28.2 MB of additional disk space will be used.
Do you want to continue [Y/n]?
==============>省略了很多<==============
重新初始化mono安装配置文件:
nike@NIKE-PC:~/src/mono-3.2.8$ ./configure --prefix=/opt/mono-3.2.8
==============>省略了很多<==============
Engine:
GC: sgen and bundled Boehm GC with typed GC and parallel mark
TLS: __thread
SIGALTSTACK: yes
Engine: Building and using the JIT
oprofile: no
BigArrays: no
DTrace: no
LLVM Back End: no (dynamically loaded: no)
Libraries:
.NET 2.0/3.5: yes
.NET 4.0: yes
.NET 4.5: yes
MonoDroid: no
MonoTouch: no
JNI support: IKVM Native
libgdiplus: assumed to be installed
zlib:
nike@NIKE-PC:~/src/mono-3.2.8$
./configure通过。
编译Mono源代码
nike@NIKE-PC:~/src/mono-3.2.8$ make
==============>漫长的编译~<==============
nike@NIKE-PC:~/src/mono-3.2.8$ sudo make install
==============>省略了很多<==============
安装成功。
设置PATH环境变量
nike@NIKE-PC:~/src/mono-3.2.8$ cd ~
nike@NIKE-PC:~$ vim .bashrc
在该文件末尾追加以下语句:
if [ -d /opt/mono-3.2.8/bin ]; then
export PATH=/opt/mono-3.2.8/bin:$PATH
fi
然后:
nike@NIKE-PC:~$ . .bashrc
nike@NIKE-PC:~$ echo $PATH
/opt/mono-3.2.8/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
nike@NIKE-PC:~$
验证Mono是否安装正确
nike@NIKE-PC:~$ mono --version
Mono JIT compiler version 3.2.8 (tarball 2014年 03月 27日 星期四 21:55:30 CST)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
nike@NIKE-PC:~$ dmcs --version
Mono C# compiler version 3.2.8.0
nike@NIKE-PC:~$
安装成功。


猜你喜欢
- 背景最近在复习Linux命令,到df的时候发现了一个之前忽略的东西。也就是 -i 这个选项,列出文件系统分区的inode信息。这个inode
- 看到起点被收编了、hao123也回家数钱玩了、QQ挂机、 * 短信、各种 * 都火了,赚钱了。于是乎,工作室、soho、再创业者也就多了。千奇百
- 4、打开审核策略开启安全审核是win2000最基本的入侵检测方法。当有人尝试对你的系统进行某些方式(如尝试用户密码,改变帐户策略,未经许可的
- 本文是由编写分布式拒绝服务攻击工具TFN和TFN2K(这些工具曾被用于攻击Yahoo等大型网站)的德国著名黑客Mixter(年仅20岁)提供
- samba服务器类似于windows上的文件共享,通过//ip地址访问文件配置ip地址 (教程:https://www.jb51.net/a
- Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,
- 研究起因由于近些日子我的VPS遭受攻击,不管是win的还是linux的都遭受了UDP攻击,流量剧增不一会DOWN机了,这让我很恼火,非常想知
- 上次写了一篇关于PayPerPost的推介文章,但是那个方法虽然可以赚钱,但是不是很多,今天我就介绍下其主业务:用博客写英文评论赚钱。适合人
- 在linux安装软件的时候,我总会有这样的想法,软件到底安装到那个目录下。因为linux系统有别与Windows系统,不是在那个盘创建一个文
- linux线程分为两类:一是核心级支持线程,二是用户级的线程。一般都为用户级的线程。一、多线程的几个常见函数要创建多线程必须加载pthrea
- 什么是别名 在管理和维护Linux系统的过程中,将会使用到大量命令,有一些很长的命令或用法经常被用到,重复而频繁的输入某个很长命令或用法是不
- 据国外媒体报道,“威比奖”(Webby Awards)周三颁发了互联网十年10大重要时刻大奖,谷歌、
- 疑似谷歌操作系统LogoGoogle Chrome界面北京时间10月14日中午消息,据国外媒体昨日报道,一位用户得到了谷歌Chrome OS
- 注意,这里我们指的是环境是IIS7,并不是以前文章介绍过的“解决IIS下UTF-8文件报错乱码的问题”!安装Win Vista后,默认使用的
- 如果设置不当,GRUB 2 可能会加载失败,随后进入启动提示符中。要解决此问题,按如下步骤执行:1. 列出 GRUB 2 识别的驱动器:gr
- 个人都喜欢好用的技巧,对吗?这里有55个用于搜索引擎优化的小技巧,甚至你的老妈用起来都易如反掌。哦,不是我的老妈,但你明白我的意思。这意味着
- 最近重新转了windows8,然后再win8下想装一个Ubuntu的虚拟机,于是先装了VMware9再安装了ubuntu,但是发
- 一个网址导航的站长,从零开始,一年做了365天,ip能从零做到2000. 平时收入一个月100-400不等。一年全年收入约等于3000 投入
- 一、SEO的工作原理一谈到SEO, 许多不是非常了解SEO的朋友容易想把它和“作弊”这个词扯到一块儿
- Google Adwords广告投放中关键字优化常见的四大难题:1.关键字展示次数偏低;2.关键字点击率偏低;3.关键字点击单价偏高。4.关