0

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

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

$ openssl version
LibreSSL 2.6.5

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

--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。

4

1 回答 1

1

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

于 2020-07-13T12:04:37.933 回答