In order to use .NET Core on your Mac, you first need to install the latest version of OpenSSL. The easiest way to get this is from Homebrew.

~$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After installing brew, you need to do the following:

~$ brew update
~$ brew install openssl
~$ ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
~$ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

When trying to initialize a basic .NET project through `dotnet new` or restoring packages on an existing one, using `dotnet restore`, you might come across the following error:

error where `dotnet: command not found`

Quick Fix

A quick way to fix this is by adding the following symbolic link:

# ln -s EXISTING_FILE SYMLINK_FILE
ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/

Brew update issue

Another issue you may come across  when execute`brew update` may be:

Error: /usr/local must be writable!

To fix it you need to … through the following command:

sudo chown -R $(whoami) /usr/local

 

 

Categorized in:

Tagged in:

,