OpenSSL, RVM, Brew, conflicting error

后端 未结 6 2050
后悔当初
后悔当初 2021-01-31 05:00

When I run brew doctor in Terminal: I get the following error:

Warning: Some keg-only formula are linked into the Cellar.
You may wish          


        
相关标签:
6条回答
  • 2021-01-31 05:40

    This seems to be the key point to be aware of, I've copied and pasted into a text doc for later use. Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add to your build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include
    

    But does anyone think that this will have consequences for our macs in general? Would a better alternative have been to force the link to the existing openssl? Or is it necessary to have the version from homebrew in order to correctly set up our Ruby development environments. I'm keen to know, as I'm in the process of doing a lot of configuring with the intention of developing a website, and I want my development environment to be as stable as possible. I appreciate any of your responses, after a semester of unix and plenty of other research, there is still so much to know! But knowledge is power!

    0 讨论(0)
  • 2021-01-31 05:46

    Try brew reinstall openssl then brew link openssl --force

    0 讨论(0)
  • 2021-01-31 05:49

    Had the same error on Mavericks just run "brew remove openssl" then "rvm install ruby"

    RVM will install the correct version of OpenSSL now.

    0 讨论(0)
  • 2021-01-31 05:51

    Specifically for Mojave,

    sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /`
    

    from https://gorails.com/setup/osx/10.14-mojave

    0 讨论(0)
  • 2021-01-31 06:02

    Hengjie is half way there.

    The problem is that OSX ships with a version of openssl in /usr/bin. Try this:

    $ /usr/bin/openssl version
    

    When homebrew installs openssl it will install it to /usr/local/Cellar/openssl, but by default it won't create the links because of the version conflict that it would create. To crete the links you need to type in:

    $ brew link --force openssl
    

    That will create symlinks to the brew version and you should be able to see the new version number by typing this:

    $ /usr/local/bin/openssl version
    

    There is one final problem. And that happens if your path variable has /usr/bin ahead of /usr/local/bin. Type this in:

    $ echo $PATH
    

    if you see /usr/bin ahead of /usr/local/bin then you need to update your .bash_profile to have something like this in it:

    export PATH="/usr/local/bin:$PATH"
    

    That will mean that the new version will be used ahead of the old one.

    Warning: the brew package says this "Mac OS X already provides this software and installing another version in parallel can cause all kinds of trouble."

    So use at your own risk! I don't actually know what the "all kinds of trouble" is.

    0 讨论(0)
  • 2021-01-31 06:07

    or DO "which openssl" copy from that location to "/usr/local/opt/openssl/bin/openssl" . then try. thing is "/usr/local/opt/openssl/bin/openssl" have old or corrupted certificate.

    0 讨论(0)
提交回复
热议问题