【问题标题】:On Mac Big Sur, how do I get the version of openssl installed through homebrew to be what is used on the command line?在 Mac Big Sur 上,如何让通过 homebrew 安装的 openssl 版本成为命令行上使用的版本?
【发布时间】:2021-09-09 14:43:14
【问题描述】:

我在 Mac OS Big Sur 上。我通过 home-brew 安装了 openssl 使用

$ brew install openssl
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from 40a7a0119 to f50b87031.
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 24 formulae.
==> Updated Casks
Updated 19 casks.

Warning: openssl@1.1 1.1.1l is already installed and up-to-date.
To reinstall 1.1.1l, run:
  brew reinstall openssl@1.1
DIG139:cfs-web davea$ brew reinstall openssl
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1l
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/7cb540b15662ae88caf307947df0254e5c64c04933630f7e9543cb018107ecbe--openssl@1.1-1.1.1l.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:ff8b2a965c680b4d9baccd60e799d0989e7dc562d2ba81696
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/b6c57e7f9acfe19e13efdfa925e9d77bbc52f6965e0f48326f64f73d18ef9c81--openssl@1.1--1.1.1l.big_sur.bottle.tar.gz
==> Reinstalling openssl@1.1 
==> Pouring openssl@1.1--1.1.1l.big_sur.bottle.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
????  /usr/local/Cellar/openssl@1.1/1.1.1l: 8,073 files, 18.5MB
Removing: /usr/local/Cellar/openssl@1.1/1.1.1k... (8,071 files, 18.5MB)
Removing: /Users/davea/Library/Caches/Homebrew/openssl@1.1--1.1.1k... (5.4MB)

以上似乎暗示我已经安装了1.1.1版本,但是当我在命令行上查看时,我看到了

$ openssl version
LibreSSL 2.8.3
$ which openssl
/usr/bin/openssl

这个较新版本的 openssl 来自哪里?如何使我的机器上的版本保持一致?

【问题讨论】:

    标签: command-line openssl homebrew macos-big-sur


    【解决方案1】:

    您可以在 shell 中添加类似的内容,以便您的环境选择 brew 版本。

    export PATH="/usr/local/opt/openssl@1/bin:$PATH"
    export LDFLAGS="-L/usr/local/opt/openssl@1/lib"
    export CPPFLAGS="-I/usr/local/opt/openssl@1/include"
    

    【讨论】:

      猜你喜欢
      • 2021-04-16
      • 1970-01-01
      • 2021-10-26
      • 2021-06-21
      • 2022-01-27
      • 2022-01-11
      • 1970-01-01
      • 1970-01-01
      • 2021-03-21
      相关资源
      最近更新 更多