Bug 51176 - Installer does not create /usr/local/bin/ if it does not exist
Summary: Installer does not create /usr/local/bin/ if it does not exist
Status: RESOLVED ANSWERED
Alias: None
Product: Installers
Classification: Mono
Component: General ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Alexis Christoforides
URL:
Depends on:
Blocks:
 
Reported: 2017-01-02 17:20 UTC by Iritscen
Modified: 2017-05-16 15:54 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Iritscen 2017-01-02 17:20:25 UTC
I thought this had been resolved at some point after the discussion on bug 33912, but the Mac installer for the Mono framework, as of "4.6 Service Release 1 (4.6.2.7)", does not seem to check for and create /usr/local/ and /usr/local/bin/ if they do not exist.  The 'mono' command ends up being unavailable from the command line because the shortcuts to the actual framework are not created anywhere within reach of bash's $PATH.  These two directories do not exist by default in macOS.

P.S.: Is the install script anywhere on GitHub?  I'm currently inspecting it as part of the actual .pkg I downloaded because I can't find it on the repo.
Comment 1 Alexander Köplinger [MSFT] 2017-05-16 15:54:22 UTC
This is an intended change, see http://www.mono-project.com/docs/about-mono/releases/4.4.1/#changes-in-the-osx-installation-package

We no longer install anything into /usr/local/bin, but instead use /etc/paths.d/mono-commands for adding the "/Library/Frameworks/Mono.framework/Versions/Current/Commands" path to PATH (which should get run automatically by your shell).

Depending on how you start your shell/script this might not get executed, in those cases you can either run the eval() script mentioned in the link I posted above or modify PATH manually.

The (post)install script is available here: https://github.com/mono/mono/blob/master/packaging/MacSDK/packaging/resources/postinstall