Homebrew refusing to link OpenSSL

前端 未结 15 2439
南旧
南旧 2020-11-22 03:51

I\'m on: OSX 10.11.6, Homebrew version 0.9.9m OpenSSL 0.9.8zg 14 July 2015

I\'m trying to play with with dotnetcore and by following their instructions,

I\'

相关标签:
15条回答
  • 2020-11-22 04:28

    This worked for me:

     brew install openssl
     cd /usr/local/include 
     ln -s ../opt/openssl/include/openssl .
    
    0 讨论(0)
  • 2020-11-22 04:30

    Note: this no longer works due to https://github.com/Homebrew/brew/pull/612

    I had the same problem today. I uninstalled (unbrewed??) openssl 1.0.2 and installed 1.0.1 also with homebrew. Dotnet new/restore/run then worked fine.

    Install openssl 101:
    brew install homebrew/versions/openssl101
    Linking:
    brew link --force homebrew/versions/openssl101

    0 讨论(0)
  • 2020-11-22 04:32

    This is what worked for me:

    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/
    ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/local/bin/openssl
    

    Thanks to @dorlandode on this thread https://github.com/Homebrew/brew/pull/597

    NB: I only used this as a temporary fix until I could spend time correctly installing Openssl again from scratch. As I remember I spent best part of a day debugging and having issues before I realised the best way was to manually install the certs I needed one by one. Please read the link in @bouke's comment before attempting this.

    0 讨论(0)
  • 2020-11-22 04:32

    The solution might be updating some tools.

    Here's my scenario from 2020 with Ruby and Python:

    I needed to install Python 3 on Mac and things escalated. In the end, updating homebrew, node and python lead to the problem with openssl. I did not have openssl 1.0 anymore, so I couldn't "brew switch" to it.
    So what was still trying to use that old 1.0 version?

    It tuned out it was Ruby 2.5.5.
    So I just installed Ruby 2.5.8 and removed the old one.

    Other things you can try if this is not enough: Use rbenv and pyenv. Clean up gems and formulas. Update homebrew, node, yarn. Upgrade bundler. Make sure your .bash_profile (or equivalent) is set up according to each tool's instructions. Reopen the terminal.

    0 讨论(0)
  • 2020-11-22 04:35

    I had the same problem while trying to install newer version of ruby 2.6.5 https://github.com/kelaberetiv/TagUI/issues/86 helps me to solve the problem. This if for macOS catalina Version 10.15.1

    Basically, I did update and upgrade homebrew and install openssl and install ruby.

    brew update && brew upgrade
    brew install openssl
    

    Then create these 2 symlinks

    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/
    

    then installed ruby 2.6.5

    0 讨论(0)
  • 2020-11-22 04:40

    After trying everything I could find and nothing worked, I just tried this:

    touch ~/.bash_profile; open ~/.bash_profile
    

    Inside the file added this line.

    export PATH="$PATH:/usr/local/Cellar/openssl/1.0.2j/bin/openssl"
    

    now it works :)

    Jorns-iMac:~ jorn$ openssl version -a
    OpenSSL 1.0.2j  26 Sep 2016
    built on: reproducible build, date unspecified
    //blah blah
    OPENSSLDIR: "/usr/local/etc/openssl"
    
    Jorns-iMac:~ jorn$ which openssl
    /usr/local/opt/openssl/bin/openssl
    
    0 讨论(0)
提交回复
热议问题