postgresql - macOS 自带的 OpenSSL 包的头文件和库在哪里?

标签 postgresql macos compilation openssl libressl

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

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

$ openssl version
LibreSSL 2.6.5

我通过向配置提供--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。

最佳答案

它们不再存在,因为它已被弃用。您可以包含自己的库,或者如果您想链接 macOS 自己的库(libssllibcrypto),您应该使用此版本的相应头文件。您可以从 Apple here 找到来源.

关于postgresql - macOS 自带的 OpenSSL 包的头文件和库在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61549863/

相关文章:

privileges - 如何在psql控制台下检查函数权限

sql - 使用查询结果设置下一个查询的表

macos - Zookeeper服务器已启动,但未保持启动状态

c++ - 在 Windows 上包含 sys/times.h 的替代方法是什么?

c# - 如何在 Visual Studio 中创建独立的 exe?

postgresql - 如何在不丢失数据的情况下将 alfresco 社区版从一台 Ubuntu 机器移动到另一台 ubuntu 机器?

javascript - `leftJoin()` 不使用 Knex.js 通过 Objection ORM 返回连接表数据

regex - 如何仅打印与 sed 匹配的内容?

ios - iOS 应用程序能否在 Xcode 模拟器中运行以访问 Mac 硬盘驱动器位置(在沙箱之外)

c++ - 我可以在GCC和Clang中为单个功能启用严格的浮点行为吗?