Linux服务器编译安装Mono笔记
人气:0一、安装依赖关系包
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
加载全部内容