MacOS – Mono not working

homebrewmacosmono

I had 2 versions of Mono installed, one via Homebrew, the other downloaded from Mono website (http://www.mono-project.com).

This was causing issues with versions, so I tried removing both.

I uninstalled Homebrew with brew uninstall mono and the other one with

sudo rm -rf /Library/Frameworks/Mono.framework
sudo pkgutil --forget com.xamarin.mono-MDK.pkg
sudo rm -rf /etc/paths.d/mono-commands

(as per website instructions.)

I then re-downloaded and installed the latest package from http://www.mono-project.com. It installed successfully, but when I try to mono from Terminal, I get /usr/local/bin/mono: No such file or directory

I tried brew unlink mono and brew rm mono, but still nothing.

Best Answer

Solution from https://stackoverflow.com/questions/32542535/how-to-install-mono-on-macos-so-mono-works-in-terminal

export PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin/:${PATH}