New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSX: An error occurred: The type initializer for 'Crypto' threw an exception. #470
Comments
|
Current proposed solution. brew update
brew install opensslFrom the root of the agent after download and extract (I will likely bake into cfg later). install_name_tool -add_rpath /usr/local/opt/openssl/lib ./bin/System.Security.Cryptography.Native.dylibIf it already exists for some reason -delete_repath with same args can be used. This tells the net core crypt dylib we distribute to use the openssl brew just installed. |
|
@bryanmacfarlane |
|
@joshka Thanks for confirming! I verified no sudo for our usage as well. |
|
net core updated it's instructions: https://www.microsoft.com/net/core#macos 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/ |
|
Those instructions are somewhat erroneous. They will work, but leave your system in an inconsistent state. The above mechanism is better IMO. |
|
Thanks for the note. Can you clarify more on the erroneous state? I have a conversation going with the net core folks so details are appreciated. |
|
There's an error repro on the original issue 597 in homebrew core iirc. Either way, a local change makes more sense to fix this than a global one |
|
The homebrew guys would give a better indication on what's the full problem here. |
|
Yes. The problem is a key scenarios for us will be building net core apps (and calling dotnet). So, folks will do the dotnet instructions in order for it to work |
|
I updated the docs |
|
In order to avoid linking openssl to system paths (which could cause problems) this is what we ended up doing then This also means you could embed the correct openssl version in the package and adjust DYLD_LIBRARY_PATH in the |
net core depends on updated openssl on OSX.
A recent change in brew makes force link fail.
Net core issue: https://github.com/dotnet/cli/issues/3964#issuecomment-236493536
The text was updated successfully, but these errors were encountered: