Centos7安装Mono(以4.6.0)为例

本文记录mono安装的必须步骤,由于只是一个记录因此操作系统及mono版本都以当前环境为准。


 

1:环境依赖

操作系统为CentOS7.0,先安装mono依赖的各种组件:

yum -y install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel fontconfig-devel  cairo-devel
View Code

 

2:下载并安装libgdiplus, libgdiplus是一个Mono库,用于对非Windows操作系统提供GDI+兼容的API。各版本的下载地址:http://download.mono-project.com/sources/libgdiplus/

cd /tmp
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-4.2.tar.gz
tar zxf libgdiplus-4.2.tar.gz 
cd libgdiplus-4.2
./configure --prefix=/usr/mono/
make
make install
echo "/usr/mono/lib" > /etc/ld.so.conf.d/mono.conf

 

3:下载并安装mono,各版本的下载地址:http://download.mono-project.com/sources/mono/

cd /tmp
wget  http://download.mono-project.com/sources/mono/mono-4.6.0.125.tar.bz2
tar jxf mono-4.6.0.125.tar.bz2
cd mono-4.6.0
./configure --prefix=/usr/mono/
make -j2
make install
echo  PATH=/usr/mono/bin:$PATH>>~/.bash_profile
source ~/.bash_profile
ldconfig

 

4:查看mono版本:

mono --version

至此mono 4.6.0版本已经安装完毕

 

posted @ 2016-08-17 11:51  CeraSumat  阅读(603)  评论(0编辑  收藏  举报