postgresql - macOS 自带的 OpenSSL 包的头文件和库在哪里?
问题描述
我刚刚安装了 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。
解决方案
它们不再存在,因为它已被弃用。要么你加入你自己的库,要么如果你想链接到 macOS 自己的库 ( libssl
& libcrypto
),你应该使用这个版本的相应头文件。您可以在此处找到来自 Apple 的资源。
推荐阅读
- android - 无法使用下载管理器下载文件
- reactjs - 反应 event.target.value.slice() 未定义的行为?
- scala - Swagger - 为什么 Swagger 在我没有为其编写注释时创建请求正文字段?
- pandas - 在 Plotly 图表上编辑构面标题
- linux-kernel - 两个节点之间的设备树依赖关系
- gooddata - 如何使用 gooddata-js 找到“本地标识符”以执行 AFM 功能
- python - Python - 使用字典更新或插入到 sqlite
- java - java.lang.IllegalArgumentException:插件已经初始化
- macos - 除了 AppleScript 之外,还有其他方法可以在 macOS 中获取前景窗口标题吗
- lua - 脚本不工作,声音不播放,砖不变色