Nginx找不到OpenSSL开发标头 [英] Nginx Cannot Find OpenSSL Development Headers
问题描述
当我在Mac上运行:rvmsudo passenger-install-nginx-module
以安装nginx时,终端将显示:
When I run: rvmsudo passenger-install-nginx-module
on my Mac to install nginx, the terminal prints:
Checking for OpenSSL development headers...
Found: no
但是我确定我已经安装了openssl. which openssl
返回/usr/local/openssl/bin/openssl
,而/usr/local/openssl/bin:
是$ PATH中的第一项.我的问题是:
But I am certain I have openssl installed. which openssl
returns /usr/local/openssl/bin/openssl
and /usr/local/openssl/bin:
is the first entry in my $PATH. My questions are:
- 常规的openssl是否通过自制程序安装了OpenSSL开发标头?
- 如果不是,我应该从哪里下载?
推荐答案
如果brew link openssl --force
给您以下消息:
警告:拒绝链接:openssl链接仅用于桶的openssl意味着您可能最终会使用Homebrew的openssl的标头针对不安全,已弃用的系统OpenSSL进行链接.而是将完整的include/library路径传递给编译器,例如:-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
Warning: Refusing to link: openssl Linking keg-only openssl means you may end up linking against the insecure, deprecated system OpenSSL while using the headers from Homebrew's openssl. Instead, pass the full include/library paths to your compiler e.g.: -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
尝试一下:
$ brew doctor (now fix anything that it tells you to fix)
$ brew update
$ brew upgrade
现在让我们安装它:
$ brew install openssl
现在我们将其链接到我们的公共区域,这样您就不必在构建自己喜欢的OpenSSL支持的库时弄清楚要设置的魔术环境变量:
And now we'll link it into our public area so you don't have to figure out the magic environment variable to set while building your favorite OpenSSL-backed library:
$ cd /usr/local/include
$ ln -s ../opt/openssl/include/openssl .
全部完成!享受
这篇关于Nginx找不到OpenSSL开发标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!