I got this error after installing the Mono framework on MacOS X 10.5.6 and trying to set up a new project with eclipse.

NAnt 0.86 (Build 0.86.2898.0; beta1; 12/08/2007)
Copyright (C) 2001-2007 Gerry Shaw

http://nant.sourceforge.net

For more information regarding the cause of the build failure, run the build again in debug mode.

Try ‘nant -help’ for more information

BUILD FAILED

Failed to initialize the ‘Mono 3.5 Profile’ (mono-3.5) target framework.

Function call failed.
Expression: ${not pkg-config::exists(‘mono’)}
^^^^^^^^^^^^^^^^^^^^^^^^^^

‘pkg-config’ failed to start.

ApplicationName=’pkg-config’, CommandLine=’–exists mono’, CurrentDirectory=’/Library/Frameworks/Mono.framework/Versions/2.4/share/NAnt/bin/’

A few google searches suggested that this might be because pkg-config wasn’t installed – but it’s included in the Mono distribution. I finally realized the symlink wasn’t being created in by the Mono installer. Running the below command fixed everything.

sudo ln -s /Library/Frameworks/Mono.framework/Commands/pkg-config /usr/bin/pkg-config

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
 

4 Responses to Mono Install Bug (Found when using Eclipse)

  1. Armon says:

    Thanks Jon! Your fix solved the same exact problem I was having with Emonic, Mono, and Eclipse. When I could not solve this problem before your post on May 8th. So I started to dual boot Windows and Mac on my Macbook and “started” to get frustrated. Today, I had some time off and decided to try fixing this problem again. Found your blog post as the sixth Google search result and now my problem is solved. Thanks again and have a safe 4th of July.

    -> Armon

  2. Abhishek says:

    thank you so much for the fix… i searched a lot online but did not find any direct solution.. your one command fixed everything ..

    awesome…

  3. Priest says:

    Once again, thank you for the fix, I wish I could bump it to the top of google search as it’s the best

  4. jon says:

    No problem – happy to help!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>