先準(zhǔn)備環(huán)境:
執(zhí)行
sudo apt-get install gcc
先安裝:libgdiplus
下載: http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.8.1.tar.bz2
解壓tar -jvxf libgdiplus-2.81.tar.bz2
進(jìn)入目錄:cd libgdiplus-2.8。1
執(zhí)行:./configure --prefix=/usr 有可能遇到的錯(cuò)誤 有:
錯(cuò)誤解決:
Error: you need to install pkg-config
執(zhí)行:sudo apt-get install pkg-config
No package 'glib-2.0' found
執(zhí)行:sudo apt-get install libglib2.0-dev
Error: *** Pibpng12 not found
執(zhí)行:sudo apt-get install libpng-dev
Error:"Failed to compile with X11/Xlib.h include"
執(zhí)行:sudo apt-get install libx11-dev
Error:cairo requires at least one font backend.please install freetype and fontconfig.
Error:./configure failed for cairo
執(zhí)行:
sudo apt-get install libfreetype6-dev
sudo apt-get install fontconfig
sudo apt-get install libfontconfig1-dev
以上的也許有些不一定需要。。但我是全給它裝了
解決以上問(wèn)題 執(zhí)行./configure --prefix=/usr基本沒(méi)問(wèn)題 了。如果還有可以用
Sudo apt-cache search 查詢(xún)需要安裝的庫(kù)
最后執(zhí)行make && make install安裝即可
最后安裝mono
執(zhí)行:cd ..
回到上層目錄,
下載:http://ftp.novell.com/pub/mono/sources/mono/mono-2.8.1.tar.bz2
解壓:tar -jvxf mono-2.8.1.tar.bz2
進(jìn)入解壓的目錄:cd mono-2.8.1
執(zhí)行:./configure --prefix=/usr
可能出現(xiàn)的錯(cuò)誤有:
Error:you need to install g++
執(zhí)行:sudo apt-get install g++
Error:you need to install bison
Sudo apt-get install bison
Error:msgfmt not found.you need to install the "gettext" package
Sudo apt-get install gettext
解決以上問(wèn)題 執(zhí)行./configure --prefix=/usr
最后執(zhí)行make && make install安裝即可(編譯時(shí)間比較久)
執(zhí)行:mono -V就可以查看當(dāng)前版本