在Linux上编译MonoDevelop 5.3时出错

R4v*_*Pr0 5 .net linux mono makefile monodevelop

我在笔记本电脑上安装了Ubuntu 14.04,我正在尝试编译从GitHub下载的MonoDevelop 5.3代码,我已经安装了所有的依赖项.

我安装了Mono 3.2.8:

raven@raven-laptop:~/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
Run Code Online (Sandbox Code Playgroud)

当我使用./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
Run Code Online (Sandbox Code Playgroud)

但是当我使用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
Run Code Online (Sandbox Code Playgroud)

如果有人知道如何解决此错误,请告诉我,谢谢.

Mat*_*ard 5

如果在Linux上编译MonoDevelop时出现NuGet错误,则可以通过直接在命令行上运行NuGet恢复来查看实际的错误消息.

mono external/nuget-binary/NuGet.exe restore Main.sln
Run Code Online (Sandbox Code Playgroud)

如果错误消息包含:

Error getting response stream (Write: The authentication or decryption has failed.): SendFailure
Run Code Online (Sandbox Code Playgroud)

然后这很可能是证书错误,因为Linux默认情况下不信任任何证书.

通常可以通过运行以下命令来修复此NuGet错误:

mozroots --import --sync
Run Code Online (Sandbox Code Playgroud)

如果以上操作不起作用,请查看NuGet on Linux Error Getting Response Stream StackOverflow帖子,其中包含其他略有不同的mozroots命令,您可以尝试.

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


小智 0

我遇到了同样的问题,无法找到解决方案,我在这里找到了一个 ppa:

https://launchpad.net/~inizan-yannick/+archive/ubuntu/mono

哪个装5.3就好了。该信息来自 MonoDevelop google+ 小组:

https://plus.google.com/communities/116399945085263839159