centos6.5下安装mono3.6和monodevelop5.0.1

建议大家再安装依赖包时不要轻易尝试全部安装新版本,会遇到各种问题。下面都是我成功安装过程,贴出来供大家参考:

下面是些能用到的地址:

Mono官方网站:http://www.mono-project.com
MonoDevelop官方网站:http://monodevelop.com/
mono官方源码包地址:http://download.mono-project.com/sources/
1、安装一些会使用到的软件包:
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;
2、安装libgdiplus:
cd /usr/local/src/
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-3.8.tar.gz
tar -zxvf libgdiplus-3.8.tar.gz
cd libgdiplus-3.8
./configure    我是默认安装,如果需要安装到指定目录,请通过--prefix=/opt/mono指定
make
make install
                 这是更改路径的,默认的不需要更改 echo "/opt/mono/lib" > /etc/ld.so.conf.d/mono.conf
ldconfig
3、安装Mono:
cd /usr/local/src/ 
wget http://download.mono-project.com/sources/mono/mono-3.6.0.tar.bz2
tar -jxvf mono-3.6.0.tar.bz2
cd mono-3.6.0
./configure       同上默认安装路径改变才用此命令--prefix=/opt/mono
make  
漫长的等待.......
make install
下面是更改默认路径之后需要配置系统环境变量
               echo export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile
               echo export LD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH>>~/.bash_profile
                echo export PATH=/opt/mono/bin:$PATH>>~/.bash_profile
                 source ~/.bash_profile
输入 mono -V 如有mono版本信息,则安装成功。

4、安装GtkSharp:
cd /usr/local/src/
wget http://download.mono-project.com/sources/gtk-sharp/gtk-sharp-2.12.11.tar.bz2
tar -jxvf gtk-sharp-2.12.11.tar.bz2
cd gtk-sharp-2.12.11
./configure                        更改路径添加--prefix=/opt/mono
make
make install

5、安装Mono-Addins:
cd /usr/local/src/
wget http://download.mono-project.com/sources/mono-addins/mono-addins-1.1.tar.bz2
tar -zxvf mono-addins-1.1.tar.gz
cd mono-addins-1.1
./configure                        更改路径添加--prefix=/opt/mono
make
make install
6、安装GnomeSharp:
yum install libgnome-devel libgnomecanvas-devel libgnomeui-devel libgnomeprint22-devel libgnomeprintui22-devel gnome-panel-devel gtkhtml3-devel gtkhtml2-devel compat-gtkhtml38-devel librsvg2-devel vte-devel libvte-java-devel
cd /usr/local/src/
wget http://download.mono-project.com/sources/gnome-sharp2/gnome-sharp-2.24.1.tar.bz2
tar -jxvf gnome-sharp-2.24.1.tar.bz2
cd gnome-sharp-2.24.1
./configure                                   更改路径--prefix=/opt/mono
make
这时会有一个Error,找不到"Mono.GetOptions"
于是找到这个编译脚本,其位于:/usr/local/src/gnome-sharp-2.24.1/sample/gnomevfs/Makefile,用vim打开它,将221行和449、450这三行脚本注释掉(如下所示):

make install
8、安装MonoDevelop:最后一步的monodevelop版本是我去官网上下载的用mono-project/sources/里面的始终没安好
cd /usr/local/src/
解压在官网下载好的monodevelop-5.0.1-0
tar -jxvf monodevelop-5.0.1-0.tar.bz2
cd monodevelop-5.0.1-0
./configure                    更改路径才添加--prefix=/opt/mono
make
make install

安装好就可以在应用程序-编程-打开monodevelop了,用monodevelop开发生成的exe文件在centos下是不能双击运行的,得用mono xxx.exe来运行

你可能感兴趣的:(centos6.5下安装mono3.6和monodevelop5.0.1)