2014-07-17 74 views
5

我在我的笔记本电脑上安装了Ubuntu 14.04,我试图编译我从GitHub下载的MonoDevelop 5.3代码,我已经安装了所有依赖项。在Linux上编译MonoDevelop 5.3时出错

我已经安装了单声道3.2.8:

[email protected]:~/Downloads/monodevelop$ mono -V 
Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1) 
Copyright (C) 2002-2014 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:   sgen 

当我使用的./configure我得到这个:

Configuration summary 

    * Installation prefix = /usr 
    * Version = 5.3 
    * Version Label = 5.3 
    * Compat Version = 5.0 
    * C# compiler = /usr/bin/dmcs 
    * Mono class library development extensions: yes 
    * Version control providers: 
    *  Subversion (Unix): yes 
    *  Git: yes 
    * Platform bindings: GNOME 
    * Unit tests: no 

Now type `make' to compile MonoDevelop 
Configuration Summary 
--------------------- 

MonoDevelop has been configured with 
    prefix = /usr 
    profile = default 

Packages included in the build: 
    main 

但是,当我使用make把我这个错误:

Errors: 

/home/raven/Downloads/monodevelop/main/Main.sln (default targets) -> 
(Build target) -> 
/home/raven/Downloads/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet.csproj (default targets) -> 
(BeforeBuild target) -> 

    /home/raven/Downloads/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet.csproj: error : Command 'mono ../../../external/nuget-binary/NuGet.exe restore -SolutionDirectory ../../..' exited with code: 1. 

    1 Warning(s) 
    1 Error(s) 

Time Elapsed 00:00:24.5810510 
make[2]: *** [sln_build] Error 1 
make[2]: Leaving directory `/home/raven/Downloads/monodevelop/main' 
make[1]: *** [all-recursive] Error 1 
make[1]: Leaving directory `/home/raven/Downloads/monodevelop/main' 
make: *** [all-recursive] Error 1 

如果有人知道如何解决这个错误,请让我知道,谢谢。

+1

尝试恢复NuGet包时出现错误。不幸的是,实际的错误信息没有显示。这可能是证书错误。尝试运行外部/ nuget-binary/NuGet.exe并将它传递到解决方案目录的路径 - 单声道../../../external/nuget-binary/NuGet.exe restore -SolutionDirectory ../ ../..'。或者你可以从目录主目录下运行'mono external/nuget-binary/NuGet.exe恢复Main.sln'。这应该会显示更好的错误信息。 –

+0

我已经使用'mono external/nuget-binary/NuGet.exe恢复Main.sln',这是错误信息: **警告:初始化函数尝试访问此实例上的值 警告:获取响应时出错流(写:认证或解密失败。):SendFailure 警告:初始化函数尝试访问此实例上的值 无法找到程序包“Microsoft.AspNet.Mvc”的版本“4.0.30506”。 无法找到包'Microsoft.AspNet.WebPages'的版本'2.0.30506'。 无法找到包'Microsoft.AspNet.Razor'的版本'2.0.30506'。'** – R4v3nPr0

+8

它看起来像一个证书问题。你有没有试过运行'mozroots --import --sync' –

回答

5

如果在Linux上编译MonoDevelop的,那么你可以通过运行的NuGet直接在命令行上恢复看到实际的错误信息时,有一个的NuGet错误。

mono external/nuget-binary/NuGet.exe restore Main.sln 

如果错误信息中包含:

Error getting response stream (Write: The authentication or decryption has failed.): SendFailure 

那么这很可能是因为Linux by default does not trust any certificates证书错误。

此的NuGet错误通常可以通过固定运行以下命令:

mozroots --import --sync 

如果以上不工作就来看看它有稍微不同mozroots命令你可以试试NuGet on Linux Error Getting Response Stream StackOverflow的职位。

(上述内容已从评论中移除以便于查找)

+0

太棒了,马特。非常感谢你。 – Tico

+0

另一件可能影响使用GNOME的用户。最近的gnome-terminal不再接受--disable-factory参数。因此,如果您想在终端外部访问Monodevelop,请创建一个脚本:'export GNOME_DESKTOP_SESSION_ID = && monodevelop'并替换.desktop文件以运行脚本而不是monodevelop。 (注意:'未设置GNOME_DESKTOP_SESSION_ID && monodevelop'也可能工作)。 – Tico

+0

第一个命令在Ubuntu 14上为我做了诀窍。 非常感谢! –