【问题标题】:Where are the header files & libraries of the OpenSSL package that comes with macOS?macOS 自带的 OpenSSL 包的头文件和库在哪里?
【发布时间】:2020-05-01 19:59:46
【问题描述】:

我刚刚安装了 macOS Catalina 版本 10.15.4 (19E287)。

它安装了 OpenSSL(实际上是 LibreSSL)。

$ openssl version
LibreSSL 2.6.5

我通过向configure 提供--with-openssl 命令行选项,从源“支持SSL(加密)连接”安装PostgreSQL。

--with-openssl

    Build with support for SSL (encrypted) connections. This
    requires the OpenSSL package to be installed. "configure" will
    check for the required header files and libraries to make sure
    that your OpenSSL installation is sufficient before proceeding.

那么我在哪里告诉编译器去寻找“必需的头文件和库”呢?

即,我应该为--with-includes--with-libraries 命令行选项添加什么到configure

--with-includes=DIRECTORIES

    "DIRECTORIES" is a colon-separated list of directories that will
    be added to the list the compiler searches for header files. If
    you have optional packages (such as GNU Readline) installed in a
    non-standard location, you have to use this option and probably
    also the corresponding "--with-libraries" option.

    Example: --with-includes=/opt/gnu/include:/usr/sup/include.

--with-libraries=DIRECTORIES

    "DIRECTORIES" is a colon-separated list of directories to search
    for libraries. You will probably have to use this option (and
    the corresponding "--with-includes" option) if you have packages
    installed in non-standard locations.

    Example: --with-libraries=/opt/gnu/lib:/usr/sup/lib.

我不想使用 Homebrew。如果必须,我宁愿从源代码安装 LibreSSL。

【问题讨论】:

    标签: postgresql macos compilation openssl libressl


    【解决方案1】:

    它们不再存在,因为它已被弃用。要么你加入你自己的库,要么如果你想链接到 macOS 自己的库 (libssl & libcrypto),你应该使用这个版本的相应头文件。您可以从 Apple here 找到来源。

    【讨论】:

      猜你喜欢
      • 2014-12-19
      • 1970-01-01
      • 2022-08-17
      • 2016-06-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-17
      • 2021-03-27
      相关资源
      最近更新 更多