日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux 编译 mono,Mono和MonoDevelop源码编译安装

發布時間:2023/12/18 linux 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 编译 mono,Mono和MonoDevelop源码编译安装 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

之所以用源碼編譯的方式安裝mono和monodevelop,是因為通過yum安裝的mono不是最新版本,而且monodevelop不能建 asp.net MVC3的工程。

而且通過源碼安裝,可以進一步了解mono的各個項目之間的關系。

我用的Fedora16系統

1.? mono的源碼編譯安裝

下載mono的最新源碼,github上的源碼編譯時總是報找不到 gmcs.exe的錯誤。

我下的是mono-2.11.3版

# tar jxvf mono-2.11.3.tar.bz2# cd mono-2.11.3# ./autogen.sh --prefix=/usr/local# make# make install

需要注意的是用root用戶來安裝,否則有錯誤。

2. monodevelop的源碼編譯安裝

monodevelop的源碼編譯安裝相當曲折,搞了好幾天。

有幾點需要注意:

在monodevelop的官網上下最新源碼,否則在./configure時會有找不到文件的錯。

在安裝monodevelop之前,要先安裝一些依賴的包。(mono-addins,gtk-sharp,libglade2,gnome-sharp-2.0)

安裝完后,需要設置LD_LIBRARY_PATH這個環境變量

用root用戶來安裝

安裝monodevelop之前,按順序安裝一些依賴包:

(gtk-sharp? --> mono-addins?--> libglade2--> gnome-sharp-2.0)

這些包在安裝時也會遇到各種問題,下面是我安裝時遇到的各種問題及解決方法,供參考。

以上的安裝順序是我總結出來的,沒有試驗過。

我安裝時并不知道上面的安裝順序,是直接安裝monodevelop,然后遇到問題再解決的。我的安裝順序如下:

1) 和mono同樣的網址下載monodevelop的最新代碼。

# tar jxvf monodevelop-3.1.0.tar.bz2# cd monodevelop-3.1.0# ./configure --prefix=`pkg-config --variable=prefix mono`

此時報了一個錯誤如下:找不到 UNMANAGED_DEPENDENCIES_MONO

====================================================================[root@localhost monodevelop-3.1.0]# ./configure --prefix=`pkg-config --variable=prefix mono`checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking how to create a ustar tar archive... gnutarchecking whether to enable maintainer-specific portions of Makefiles... nochecking for mono... /usr/local/bin/monochecking for gmcs... /usr/local/bin/gmcschecking for update-mime-database... /usr/bin/update-mime-databasechecking for pkg-config... /usr/bin/pkg-configchecking for msgfmt... /usr/bin/msgfmtchecking for msgmerge... /usr/bin/msgmergechecking pkg-config is at least version 0.9.0... yeschecking for UNMANAGED_DEPENDENCIES_MONO... noconfigure: error: Please install mono version 2.8 or later to install MonoDevelop.Please see http://www.mono-project.org/ to download latest mono sources or packages====================================================================

通過以下命令修復此錯誤:

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

再次執行:

# ./configure --prefix=`pkg-config --variable=prefix mono`

此時報了一個錯誤如下:找不到 mono-addins

====================================================================checking for UNMANAGED_DEPENDENCIES_MONO... yeschecking for mono... /usr/local/bin/monochecking for dmcs... /usr/local/bin/dmcschecking for MONO_ADDINS... noconfigure: error: Package requirements (mono-addins >= 0.6) were not met:No package 'mono-addins' foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively, you may set the environment variables MONO_ADDINS_CFLAGSand MONO_ADDINS_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.====================================================================

# tar jxvf mono-addins-0.6.2.tar.bz2# cd mono-addins-0.6.2# ./configure --prefix=/usr/local

此時報了一個錯誤如下:找不到 gtk-sharp-2.0

====================================================================checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking how to create a ustar tar archive... gnutarchecking whether to enable maintainer-specific portions of Makefiles... nochecking for pkg-config... /usr/bin/pkg-configchecking for a BSD-compatible install... /usr/bin/install -cchecking for gmcs... /usr/local/bin/gmcschecking for gacutil... /usr/local/bin/gacutilchecking for al... /usr/local/bin/alchecking pkg-config is at least version 0.9.0... yeschecking for GTK_SHARP_20... configure: error: Package requirements (gtk-sharp-2.0) were not met:No package 'gtk-sharp-2.0' foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively, you may set the environment variables GTK_SHARP_20_CFLAGSand GTK_SHARP_20_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.====================================================================

# tar jxvf gtk-sharp-2.12.11.tar.bz2# cd gtk-sharp-2.12.11# ./configure --prefix=/usr/local# make# make install

gtk-sharp安裝成功后,接著安裝mono-addins

# cd ../mono-addins-0.6.2# ./configure --prefix=/usr/local# make# make install

mono-addins安裝成功后,接著安裝monodevelop

# cd ../monodevelop-3.1.0# ./configure --prefix=`pkg-config --variable=prefix mono`

此時報了一個錯誤如下:找不到 glade-sharp-2.0

====================================================================[root@localhost monodevelop-3.1.0]# ./configure --prefix=`pkg-config --variable=prefix mono`checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking how to create a ustar tar archive... gnutarchecking whether to enable maintainer-specific portions of Makefiles... nochecking for mono... /usr/local/bin/monochecking for gmcs... /usr/local/bin/gmcschecking for update-mime-database... /usr/bin/update-mime-databasechecking for pkg-config... /usr/bin/pkg-configchecking for msgfmt... /usr/bin/msgfmtchecking for msgmerge... /usr/bin/msgmergechecking pkg-config is at least version 0.9.0... yeschecking for UNMANAGED_DEPENDENCIES_MONO... yeschecking for mono... /usr/local/bin/monochecking for dmcs... /usr/local/bin/dmcschecking for MONO_ADDINS... yeschecking for MONO_ADDINS_SETUP... yeschecking for MONO_ADDINS_GUI... yeschecking for GLIB_SHARP... yeschecking for GTK_SHARP... yeschecking for GLADE_SHARP... noconfigure: error: Package requirements (glade-sharp-2.0 >= 2.12.8) were not met:No package 'glade-sharp-2.0' foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively, you may set the environment variables GLADE_SHARP_CFLAGSand GLADE_SHARP_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.====================================================================

我不知道glade-sharp是什么包,先安裝了libgdiplus

# tar jxvf libgdiplus-2.10.9.tar.bz2# cd libgdiplus-2.10.9# ./configure --prefix=/usr/local# make

make時報了一個錯誤如下:

====================================================================/usr/lib64/libglib-2.0.so.0: could not read symbols: Invalid operationcollect2: error: ld returned 1 exit statusmake[2]: *** [testgdi] Error 1make[2]: Leaving directory `/usr/local/src/libgdiplus-2.10.9/tests'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/usr/local/src/libgdiplus-2.10.9'make: *** [all] Error 2====================================================================

解決辦法如下:

1. 運行./configure --prefix=/usr/local 之后,編輯 tests/Makefile 文件

2. 在Makefile文件130行位置,將?? LIBS = -lpthread -lfontconfig

改為 LIBS = -lpthread -lfontconfig -lglib-2.0 -lX11

3. 再次運行 make 即可

# make# make install

接著安裝monodevelop

# cd ../monodevelop-3.1.0# ./configure --prefix=`pkg-config --variable=prefix mono`

仍然是錯誤:找不到 glade-sharp-2.0

利用yum 安裝libglade2-devel,mono源碼中沒找到這個包

# yum search libglade2# yum install libglade2-devel.x86_64

知道這個包的名稱,也可以找相應的rpm來安裝。

安裝完libglade2后,重新安裝 gtk-sharp2,安裝方法上面已有。

接著,再次嘗試安裝 monodevelop:# ./configure --prefix=`pkg-config --variable=prefix mono`

此時報了一個錯誤如下:未安裝gnome-sharp-2.0

====================================================================[root@localhost monodevelop-3.1.0]# ./configure --prefix=`pkg-config --variable=prefix mono`checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking how to create a ustar tar archive... gnutarchecking whether to enable maintainer-specific portions of Makefiles... nochecking for mono... /usr/local/bin/monochecking for gmcs... /usr/local/bin/gmcschecking for update-mime-database... /usr/bin/update-mime-databasechecking for pkg-config... /usr/bin/pkg-configchecking for msgfmt... /usr/bin/msgfmtchecking for msgmerge... /usr/bin/msgmergechecking pkg-config is at least version 0.9.0... yeschecking for UNMANAGED_DEPENDENCIES_MONO... yeschecking for mono... /usr/local/bin/monochecking for dmcs... /usr/local/bin/dmcschecking for MONO_ADDINS... yeschecking for MONO_ADDINS_SETUP... yeschecking for MONO_ADDINS_GUI... yeschecking for GLIB_SHARP... yeschecking for GTK_SHARP... yeschecking for GLADE_SHARP... yeschecking for MONODOC... yeschecking for GNOME_SHARP... nochecking for GNOME_VFS_SHARP... nochecking for GCONF_SHARP... noconfigure: error: Cannot enable GNOME platform without gnome-sharp-2.0====================================================================

# tar jxvf gnome-sharp-2.20.1.tar.bz2# cd gnome-sharp-2.20.1# ./configure --prefix=/usr/local

雖然沒有報錯,但是提示缺少3個assmely: art-sharp.dll,gnomevfs-sharp.dll,gnome-sharp.dll

====================================================================Configuration summary* Installation prefix = /usr/local* C# compiler: /usr/local/bin/mcs -define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GNOME_SHARP_2_16 -define:GNOME_SHARP_2_20Optional assemblies included in the build:* art-sharp.dll: no* gnomevfs-sharp.dll: no* gnome-sharp.dll: noNOTE: if any of the above say 'no' you may install thecorresponding development packages for them, rerunautogen.sh to include them in the build.gnome-sharp.dll requires libgnomecanvas, libgnome,libgnomeui, libgnomeprint, libgnomeprintui, andlibpanelapplet.====================================================================

下面的兩個dll對應如下庫:(我是通過 yum找到的)

art-sharp.dll???????????? : libart_lgpl-devel

gnomevfs-sharp.dll: gnome-vfs2-devel

最后一個根據上面的提示,(對應如下庫)

gnome-sharp.dll?? : libgnomecanvas, libgnome,

libgnomeui, libgnomeprint, libgnomeprintui, and

libpanelapplet(即gnome-panel-devel)

# make

make 后,報出如下錯誤:

====================================================================error CS0006: Metadata file `Mono.GetOptions.dll' could not be found====================================================================

經過調查,

1.? 原來是gnome-sharp版本太舊的原因,

前面用的gnome-sharp-2.20.*用了Mono.GetOptions,更新至gnome-sharp-2.24.*

2.? 注釋掉gnome-sharp-2.24.1/sample/gnomevfs/Makefile中關于 Mono.GetOptions的內容

# tar jxvf gnome-sharp-2.24.1.tar.bz2# cd gnome-sharp-2.24.0# ./configure --prefix=/usr/local# make# make install

接著,再次嘗試安裝 monodevelop:

# ./configure --prefix=`pkg-config --variable=prefix mono`

此時會產生一些找不到 tests/UnitTests/Makefile.in 之類的錯誤。

經過調查,似乎是monodevelop 版本的問題,在monodevelop官網上下載最新的代碼,

然后重新安裝,終于安裝成功。官網上最新版是3.0.3.4

# tar jxvf monodevelop-3.0.3.4.tar.bz2# cd ../monodevelop-3.0.3.4# ./configure --prefix=`pkg-config --variable=prefix mono`# make# make install

安裝完后,monodevep卻無法啟動,錯誤如下:

====================================================================System.TypeInitializationException: An exception was thrown by the type initializer for Mono.Unix.Native.Syscall ---> System.DllNotFoundException: libMonoPosixHelper.soat (wrapper managed-to-native) Mono.Unix.Native.Syscall:_L_ctermid ()at Mono.Unix.Native.Syscall..cctor () [0x00032] in /home/wangyb/downloads/mono/mono-2.11.3/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs:2599--- End of inner exception stack trace ---at MonoDevelop.Core.LoggingService.RedirectOutputToFileUnix (FilePath logDirectory, System.String logName) [0x0001f] in /home/wangyb/downloads/mono/monodevelop-3.0.3.4/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs:177at MonoDevelop.Core.LoggingService.RedirectOutputToLogFile () [0x00046] in /home/wangyb/downloads/mono/monodevelop-3.0.3.4/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs:140FATAL ERROR [2012-07-29 07:59:49Z]: MonoDevelop failed to start. Some of the assemblies required to run MonoDevelop (for example gtk-sharp, gnome-sharp or gtkhtml-sharp) may not be properly installed in the GAC.System.TypeInitializationException: An exception was thrown by the type initializer for Gtk.Application ---> System.DllNotFoundException: glibsharpglue-2at (wrapper managed-to-native) GLib.Thread:glibsharp_g_thread_supported ()at GLib.Thread.get_Supported () [0x00000] in :0at Gtk.Application..cctor () [0x00000] in :0--- End of inner exception stack trace ---at MonoDevelop.Ide.IdeStartup.Run (MonoDevelop.Ide.MonoDevelopOptions options) [0x00085] in /home/wangyb/downloads/mono/monodevelop-3.0.3.4/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:95at MonoDevelop.Ide.IdeStartup.Main (System.String[] args) [0x00058] in /home/wangyb/downloads/mono/monodevelop-3.0.3.4/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:503====================================================================

將LD_LIBRARY_PATH加入到啟動的配置文件中,即 ~/.bashrc

內容如下:

# add mono LD_LIBRARY_PATHexport LD_LIBRARY_PATH=/usr/local/lib

終于啟動成功,也有 aspnet-mvc3的工程了 ^_^

3. 總結

記錄下安裝過程的錯誤,也是方便以后遇到相同的錯誤可以知道怎么解決。

大家在安裝過程中如果有什么新的問題,歡迎交流。

總結

以上是生活随笔為你收集整理的linux 编译 mono,Mono和MonoDevelop源码编译安装的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: wwwwxxxxx日本| 99在线观看免费 | 嫩草网站在线观看 | 中日韩在线观看视频 | 免费av网址在线观看 | 五月网| 黄色aaa大片 | 中文国产字幕 | 国产91丝袜在线播放 | 黄网免费在线观看 | 久久久国产精品一区二区三区 | 成熟了的熟妇毛茸茸 | av一道本 | 黄色视屏在线播放 | 在线免费一区二区 | 婷婷色婷婷开心五月四房播播 | 中文字幕乱码亚洲无线三区 | 视频在线观看免费 | av一区二区三区四区 | 黄色一区二区三区四区 | 射综合网 | 国产成人在线网站 | 国产精品亚洲欧美 | 精品午夜视频 | 在线无| 国产精品无码自拍 | 免费看色 | av成人在线免费观看 | 国产毛片3 | 象人高潮调教丨vk | 在线欧美亚洲 | 欧洲黄色片| 日韩精品中文字幕在线播放 | 中文字幕第三页 | 天堂色综合 | 久久精品性 | 男人深夜影院 | 在线黄色网 | 天天干一干| 日本伊人影院 | 欧美黄色性 | 视频在线播 | 精品人妻伦一区二区三区久久 | 中文字幕亚洲一区 | 成熟人妻av无码专区 | 无码人妻久久一区二区三区不卡 | 日韩3p| 无码不卡av东京热毛片 | 日本毛片网站 | 大陆av片 | 中文在线观看免费网站 | 精品无码成人久久久久久免费 | 黑人vs亚洲人在线播放 | 国产国语老龄妇女a片 | 天堂中文资源在线 | 蜜桃视频久久 | 久久一二区 | 深夜福利久久 | 欧美粗暴se喷水 | 成人午夜激情 | 亚洲女人18毛片水真多 | 成人午夜视频网站 | 激情六月综合 | 美女脱光内衣内裤 | 请用你的手指扰乱我吧 | 国产亚洲精品久久久久久久久动漫 | 精品熟女一区二区三区 | 国产色视频在线 | 中文久久乱码一区二区 | 亚洲一区二区色图 | 在线中文字幕第一页 | 人妻精品久久久久中文字幕 | 日本精品入口免费视频 | 亚洲吧| 成年人在线观看av | 精品国产av色一区二区深夜久久 | 91麻豆蜜桃一区二区三区 | 91一二区 | 日韩精品一区二区在线观看 | 国产在线操 | 国产精品久久久久久免费播放 | 天天摸天天舔 | 草久在线| 国产福利视频导航 | 三a大片| 玩弄白嫩少妇xxxxx性 | 可以免费看av | 日本69少妇 | 在线伊人 | 欧美在线国产 | 午夜免费高清视频 | 中文字幕乱码亚洲无线三区 | 久久国产亚洲 | 国产精品无码影院 | av片一区二区 | 韩国伦理电影免费在线 | 午夜在线播放 | 午夜看片网站 | 日韩一区二区三区在线视频 |