1

我正在尝试在 Ubuntu 12.04 上构建 MonoDevelop 4.0.9,它需要 Mono 2.10.9 或更高版本才能构建。由于 Ubuntu 仅提供 Mono 2.10.8,我从源代码构建了 Mono 2.10.9 并安装到 /opt/mono-2.11 中。如何强制 ./configure 使用 /opt/mono-2.11/bin 中的 Mono 2.10.9 而不是 /usr/bin?

我试过更新$PATH,但没有帮助:

/tmp/monodevelop [(monodevelop-4.0.9)]$ PATH=/opt/mono-2.11/bin:$PATH
/tmp/monodevelop [(monodevelop-4.0.9)]$ ./configure

Configuring package: main
-------------------------
Configuration options:
Running aclocal  ...
Running automake --foreign  ...
Running autoconf ...
Running ./configure --enable-maintainer-mode --enable-compile-warnings --prefix=/usr/local ...
configure: WARNING: unrecognized options: --enable-compile-warnings
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for mono... /opt/mono-2.11/bin/mono
checking for gmcs... /opt/mono-2.11/bin/gmcs
checking for pkg-config... /usr/bin/pkg-config
configure: error: You need mono 2.10.9 or newer
/tmp/monodevelop [(monodevelop-4.0.9)]$

更新:我刚刚尝试使用新的 Mono 运行现有的 MonoDevelop 安装:

~$ PATH=/opt/mono-2.10.9/bin:$PATH monodevelop

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
File name: 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at MonoDevelop.Startup.MonoDevelopMain.Main (System.String[] args) [0x00000] in /build/buildd/monodevelop-latest-1345013906/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs:16
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
File name: 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at MonoDevelop.Startup.MonoDevelopMain.Main (System.String[] args) [0x00000] in /build/buildd/monodevelop-latest-1345013906/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs:16
Missing method get_IsInitialized in assembly /usr/lib/monodevelop/bin/MonoDevelop.Ide.dll, type Mono.Addins.AddinManager

这是否意味着我的 Mono 安装不完整?我是否需要以某种方式构建这些缺失的程序集?

更新:我尝试使用Parallel Mono Environments并创建了 ~/mono-dev-env (我没有更改 GNOME_PREFIX,因为我认为我没有安装它)。但是在运行 MonoDevelop 时仍然出现错误:

/tmp/mono-2.10.9$ . mono-dev-env
[mono] /tmp/mono-2.10.9 @ mono --version
Mono JIT compiler version 2.10.9 (tarball Wed Jul 17 12:46:30 CEST 2013)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            Included Boehm (with typed GC and Parallel Mark)
[mono] /tmp/mono-2.10.9 @ monodevelop

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
File name: 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at MonoDevelop.Startup.MonoDevelopMain.Main (System.String[] args) [0x00000] in /build/buildd/monodevelop-latest-1345013906/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs:16
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
File name: 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at MonoDevelop.Startup.MonoDevelopMain.Main (System.String[] args) [0x00000] in /build/buildd/monodevelop-latest-1345013906/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs:16
Missing method get_IsInitialized in assembly /usr/lib/monodevelop/bin/MonoDevelop.Ide.dll, type Mono.Addins.AddinManager
4

1 回答 1

1

为了确保 Mono 应用程序在您构建的自定义版本的 Mono 中运行,您应该使用并行单声道环境

于 2013-07-17T07:12:43.710 回答