Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Mono on macOS so mono works in terminal?

Tags:

macos

mono

I'm trying to get a Mono install running on a mac (OS X version 10.10.5), and while the install states that it's completed successfully, I'm not able to call mono from the terminal.

To install it, I ran uninstallMono.sh as root to ensure we didn't have any leftover cruft, then ran MonoFramework-MDK-4.0.4.1.macos10.xamarin.x86.pkg. The installer appeared to complete successfully, but an attempt to call mono returns

-bash: mono: command not found

The mono framework does appear to be installed:

Lees-Mac-Pro:Downloads kevinmack$ cd /Volumes/Macintosh\ HD/Library/Frameworks/ Lees-Mac-Pro:Frameworks kevinmack$ ls -l total 32 lrwxr-xr-x  1 root  wheel   71 Jan 20  2015 AEProfiling.framework -> ../../Applications/Motion.app/Contents/Frameworks/AEProfiling.framework lrwxr-xr-x  1 root  wheel   74 Jan 20  2015 AERegistration.framework -> ../../Applications/Motion.app/Contents/Frameworks/AERegistration.framework lrwxr-xr-x  1 root  wheel   74 Jan 20  2015 AudioMixEngine.framework -> ../../Applications/Motion.app/Contents/Frameworks/AudioMixEngine.framework drwxr-xr-x  8 root  admin  272 Sep 12 11:24 Mono.framework lrwxr-xr-x  1 root  wheel   60 Sep  9 22:16 NyxAudioAnalysis.framework -> /System/Library/PrivateFrameworks/NyxAudioAnalysis.framework drwxr-xr-x  5 root  wheel  170 Jan 20  2015 PluginManager.framework drwxr-xr-x  8 root  wheel  272 Sep  9 22:19 iTunesLibrary.framework 

...but it isn't present in /usr/bin and attempting to find its executable using which mono returns nothing.

like image 406
Kevin Mack Avatar asked Sep 12 '15 18:09

Kevin Mack


People also ask

How do I get Mono on my Mac?

Visit the download page to find the latest macOS package. Run it and follow the instructions there, you can either get a basic runtime, or a complete runtime plus a software development kit. If you plan on developing applications with Mono, we suggest that you also install the MonoDevelop IDE after you install Mono.


1 Answers

In OS X El Capitan, run the following in Terminal to support mono command

export PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin/:${PATH} 
like image 156
Jeffrey Neo Avatar answered Sep 21 '22 20:09

Jeffrey Neo