Linux服务器编译安装Mono笔记
Linux服务器编译安装Mono笔记
发布时间:2016-12-27 来源:查字典编辑
摘要:一、安装依赖关系包yuminstallgccbisonpkgconfigglib2-develgettextmakegcc-c++libst...

一、安装依赖关系包

yum install gcc bison pkgconfig glib2-devel gettext make gcc-c++ libstdc++-devel libgdiplus-devel

二、下载源码并解压

#下载地址在http://ftp.novell.com/pub/mono/sources/mono/

#我下载的是2.10.2</p> <p>cd /usr/local/src

wget -c http://ftp.novell.com/pub/mono/sources/mono/mono-2.10.2.tar.bz2

tar xf mono-2.10.2.tar.bz2

cd mono-2.10.2

三、编译安装

./configure --prefix=/usr/local/mono

make

make install

四、为使用mono的用户增加环境变量

#在这个用户的~/.bash_profile时增加

export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:

export PATH=/usr/local/mono/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

#重新加载一下

source ~/.bash_profile

五、测试

/usr/local/mono/bin/mono-test-install

Active Mono: /usr/local/mono/bin/mono</p> <p>Your have a working System.Drawing setup

Your file system watcher is: System.IO.InotifyWatcher

如果没有做第四步会发现报下边这个错误:

/usr/local/mono/bin/mono-test-install

Active Mono:

Warning: pkg-config could not find mono installed on this system

No dotnet pkgconfig found, Windows.Forms, System.Drawing and others will not work

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新unix linux学习
热门unix linux学习
操作系统子分类