5

I have installed Ubuntu 14.04 on my laptop and I'm trying to compile the code of MonoDevelop 5.3 that I downloaded from GitHub, I've installed all the dependencies.

I have installed 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

When I used ./Configure I get this:

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

But when I use make sends me this error:

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

If anyone knows how to fix this error, please let me know, thanks.

R4v3nPr0
  • 121
  • 8
  • 1
    It is an error when trying to restore the NuGet packages. Unfortunately the actual error message is not displayed. It may be a certificate error. Try running the external/nuget-binary/NuGet.exe and pass it the path to the solution directory - `mono ../../../external/nuget-binary/NuGet.exe restore -SolutionDirectory ../../..`. Or you could just run `mono external/nuget-binary/NuGet.exe restore Main.sln` from the directory main directory. That should show a better error message hopefully. – Matt Ward Jul 17 '14 at 11:25
  • I already used `mono external/nuget-binary/NuGet.exe restore Main.sln` and this was the error message: **`WARNING: The initialization function tries to access Value on this instance WARNING: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure WARNING: The initialization function tries to access Value on this instance Unable to find version '4.0.30506' of package 'Microsoft.AspNet.Mvc'. Unable to find version '2.0.30506' of package 'Microsoft.AspNet.WebPages'. Unable to find version '2.0.30506' of package 'Microsoft.AspNet.Razor'.`** – R4v3nPr0 Jul 17 '14 at 16:39
  • 8
    It looks like a certificate problem. Have you tried running `mozroots --import --sync` – Matt Ward Jul 17 '14 at 17:01
  • Thank you, now I can compile the code – R4v3nPr0 Jul 18 '14 at 21:09
  • @MattWard you should make that an answer so it can be accepted. – Martin Sep 20 '14 at 11:38
  • @MattWard That solved the problem. Would you mind explaining how you'd managed to solve it? – trinaldi Oct 24 '14 at 22:43
  • 1
    @Tico - I hit a problem NuGet on Linux a long time ago and whilst searching for the error message I read about the mozroots fix from here - http://monomvc.wordpress.com/2012/03/06/nuget-on-mono/ - Anything that makes a HTTPS call can fail on Linux since by default it does not trust anybody - http://www.mono-project.com/docs/faq/security/ – Matt Ward Oct 25 '14 at 10:22

2 Answers2

5

If there is a NuGet error when compiling MonoDevelop on Linux then you can see the actual error message by running NuGet restore directly on the command line.

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

If the error message contains:

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

Then this is most likely a certificate error since Linux by default does not trust any certificates.

This NuGet error can usually be fixed by running the following command:

mozroots --import --sync

If the above does not work take a look at the NuGet on Linux Error Getting Response Stream StackOverflow post which has other slightly different mozroots commands you can try.

(The above was moved from the comments to make it easy to find)

Community
  • 1
  • 1
Matt Ward
  • 47,057
  • 5
  • 93
  • 94
  • Another thing that might affect users using GNOME. Recent gnome-terminal no longer accepts the --disable-factory argument. So, if you want to access Monodevelop outside the terminal create a script: `export GNOME_DESKTOP_SESSION_ID= && monodevelop` and replace the .desktop file to run the script instead of just monodevelop. (Note: `unset GNOME_DESKTOP_SESSION_ID && monodevelop` might also work). – trinaldi Oct 25 '14 at 15:54
  • The first command did the trick for me on Ubuntu 14. Thanks a lot man! – Fabricio Dec 07 '14 at 14:55
0

I had the same problem, being unable to find a solution, I found a ppa here:

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

Which installed 5.3 fine. The information came from the MonoDevelop google+ group here:

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