Skip to content
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

Can't install the latest openssl using homebrew #7632

Closed
AccessssIt opened this issue Jan 30, 2017 · 12 comments
Closed

Can't install the latest openssl using homebrew #7632

AccessssIt opened this issue Jan 30, 2017 · 12 comments

Comments

@AccessssIt
Copy link

I have tried the following commands to run a new openssl installation (btw. I run the latest macOS 10.12.3):

brew update
brew install openssl

Unfortunately i got this warning: "Warning: openssl is a keg-only and another version is linked to opt. Use brew install --force if you want to install this version"

Thereupon I tried the follwing command as recommended: "brew install --force"

This time I got an error: "Error: Invalid usage: This command requires a formula argument".

I just wanted to use .Net Core for macOS :/ I used this tutorial for installing openssl-> https://www.microsoft.com/net/core#macos

@dasMulli
Copy link
Contributor

The idea is to run brew install --force openssl. You're missing the last argument.
You can also use brew unlink openssl before installing newer versions if you've already installed an older version using homebrew.

@AccessssIt
Copy link
Author

oh, I was too fast. thx for the advice!
Now I got a new warning: "Warning: openssl-1.0.2k already installed, it's just not linked"
If I use the command "openssl version" I got this result "OpenSSL 0.9.8zh 14 Jan 2016"

@dasMulli
Copy link
Contributor

That is okay. macOS ships with this old version, that is why the update is required.
.NET Core only uses the libraries (libcrypto,libssl) so the version of the executable program doesn't matter.
There are some security and compatibility considerations about automatically making available new versions of OpenSSL to all programs on the system. That is why homebrew decided not to allow "linking" of openssl anymore and the instructions on https://dot.net list commands using ln -s … to get started with .net core.

@TheRealPiotrP
Copy link
Contributor

OpenSSL is a CoreFx dependency that's transitive through CLI. I'll make sure this issue gets reflected in that repo!

@dasMulli
Copy link
Contributor

@piotrpMSFT I don't think this is anything new here.. Other than maybe a dupe of #6690
I just tried to upgrade my openssl version and brew install openssl --force is what I needed, the symlinks as documented on https://www.microsoft.com/net/core#macos still is what makes it work.

@TheRealPiotrP
Copy link
Contributor

Ok, thanks for looking @dasMulli. Closing as dupe of #6690.

@HjoshM
Copy link

HjoshM commented Feb 5, 2017

@dasMulli Do I understand your helpful comments correctly that the warning "openssl is a keg-only and another version is linked to opt" implies that an older version of openssl exists and that the version of the executable program doesn't matter for .NET Core?
A while ago, I successfully installed vscode and all its prerequisites and requirements, to be able to run C# on a mac, but then I uninstalled it... Now, I am trying to install it again by following the same instructions, though when I go for .NET Core and openssl, I get that warning.

@dasMulli
Copy link
Contributor

dasMulli commented Feb 5, 2017

@HjoshM it means that some version is already installed linked in homebrew's location, so there has probably been an update since you first installed openssl. That warning is only there for safety so you don't accidentally break software that depends on a specific version.

@8bitreid
Copy link

8bitreid commented Mar 8, 2017

I'm getting this message

openssl-1.0.2k already installed, it's just not linked

Still not able to run Visual Studio projects at this time.

@KOliverHulme
Copy link

You have to uninstall openssl first brew uninstall openssl. Make sure you unlink it first brew unlink openssl though.
If it complains that it's a dependency for wget so it shouldn't be uninstalled, use brew uninstall --ignore-dependencies openssl to get around it. Just reinstall openssl directly after you uninstall it.

@ayurjev
Copy link

ayurjev commented May 23, 2017

I had the same problem, but unlinking previous version did not help...
I also tried to do that trick with "ln -s /usr/local/opt/openssl..." few times, but had no success...
But when I tried to unlink previous version I noticed this line in my terminal:

brew unlink openssl
Unlinking /usr/local/Cellar/openssl/1.0.2k... 0 symlinks removed

So, then I decided to repeat that trick with "ln -s" but instead of using /usr/local/opt/openssl/lib I used /usr/local/Cellar/openssl/1.0.2k/lib.
That solved my problem completely!

@walles
Copy link

walles commented May 23, 2017

I had to do xcode-select --install to get my /usr/local/include/openssl symlink to be recognized by the C compiler.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants