Permalink
Browse files

Update dotnet core osx instructions to symlink

  • Loading branch information...
joshka committed Aug 18, 2016
1 parent ea071ac commit fed667f640251b74a4cbb92d446136d75e3fe95e
Showing with 13 additions and 10 deletions.
  1. +13 −10 _posts/2016-08-03-installing-dotnet-osx.md
@@ -5,8 +5,12 @@ date: 2016-08-03 19:31:00 -0500
categories:
---
**Update 2016-08-18:** replaced rpath with linking
The easiest way to install [.NET Core](https://www.microsoft.com/net/core#macos)
on OSX is a little different than the way currently suggested on the official site. I suggest using [Homebrew](http://brew.sh), and [Homebrew Cask](http://caskroom.io).
on OSX is a little different than the way currently suggested at the Previous
link. I suggest using [Homebrew](http://brew.sh), and
[Homebrew Cask](http://caskroom.io).
## Instructions
@@ -16,22 +20,21 @@ If you have not already installed Homebrew, install it.
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
Install dotnet using caskroom. This will also automatically install openssl if it's not already installed.
Install dotnet using caskroom. This will also automatically install openssl if
it's not already installed.
```console
$ brew update
$ brew tap caskroom/cask
$ brew cask install dotnet
```
By default, the installation of .NET Core links the crypto library to a folder location other than the Homebrew default. To fix the link to the openssl libraries run the following.
Note: this will work completely once
[homebrew-cask#23854](https://github.com/caskroom/homebrew-cask/pull/23854) is
merged. Until then, follow the part of instructions that link the 1.0.0 versions
of openssl to your `/usr/local/lib` folder.
```console
$ sudo install_name_tool -add_rpath \
$(brew --prefix openssl)/lib \
/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.0/System.Security.Cryptography.Native.dylib
$ 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/
```
## Rationale
The [current installation instructions](https://www.microsoft.com/net/core#macos) suggest symlinking openssl libraries installed by Homebrew to `/usr/local/lib`. This approach is not the best, as it has the potential to cause security issues or cause software that's installed outside the Homebrew ecosystem to break. Previous instructions called on users to run `brew link openssl --force`, which Homebrew recently disabled specifically to avoid these issues.

0 comments on commit fed667f

Please sign in to comment.