一、安装依赖关系包
复制代码
yum install gcc bison pkgconfig glib2-devel gettext make gcc-c++ libstdc++-devel libgdiplus-devel
代码如下:
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
代码如下:
#下载地址在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
代码如下:
./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
代码如下:
#在这个用户的~/.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: /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
代码如下:
/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
相关文章
猜你喜欢
- 个人网站搭建:如何挑选具有弹性扩展能力的服务器? 2025-06-10
- 个人服务器网站搭建:如何选择适合自己的建站程序或框架? 2025-06-10
- 64M VPS建站:能否支持高流量网站运行? 2025-06-10
- 64M VPS建站:怎样选择合适的域名和SSL证书? 2025-06-10
- 64M VPS建站:怎样优化以提高网站加载速度? 2025-06-10
TA的动态
- 2025-07-10 怎样使用阿里云的安全工具进行服务器漏洞扫描和修复?
- 2025-07-10 怎样使用命令行工具优化Linux云服务器的Ping性能?
- 2025-07-10 怎样使用Xshell连接华为云服务器,实现高效远程管理?
- 2025-07-10 怎样利用云服务器D盘搭建稳定、高效的网站托管环境?
- 2025-07-10 怎样使用阿里云的安全组功能来增强服务器防火墙的安全性?
快网idc优惠网
QQ交流群
您的支持,是我们最大的动力!
热门文章
-
2025-05-25 72
-
2025-05-26 71
-
2025-05-25 80
-
2025-05-26 50
-
2025-05-29 45
热门评论

