As mentioned in my previous post on exploring .Net CLI, I encountered a problem doing “dotnet restore” on my machine. The problem is brew refusing to link openssl after I updating brew. Here is the old steps as instructed from dot.net website.
brew update brew install openssl brew link --force openssl
After issuing the command “brew link –force openssl” I encounter this message from brew.
Warning: Refusing to link: openssl Linking keg-only OpenSSL means you may end up linking against the insecure, deprecated system version while using the headers from the Homebrew version. Instead, pass the full include/library paths to your compiler e.g.: -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
This is the reason why “dotnet restore” is not working with getting the libraries to my machine. I even logged an issue on .Net CLI github to document the error. It seems brew developers blocked the “brew link –force openssl” command to openssl as noted on this brew commit on github.
Since then dot.net updated their instructions to the following to fix the issue.
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/
It may be a short term work around as the original logged issue about the error on linking openssl is still open as of today. The good news is that you can now work with .Net Core with .Net CLI on Mac. Lets wait and see. Happy coding!