Linux服务器编译安装Mono笔记

软件发布|下载排行|最新软件

当前位置:首页操作系统Linux操作系统

Linux服务器编译安装Mono笔记

  2020-12-11 我要评论

一、安装依赖关系包



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

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们