编译openresty提示缺少openssl
这个错误提示表明你的系统缺少 OpenSSL 库,而 Nginx 的 SSL 模块需要这个库。
·
报错
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.
这个错误提示表明你的系统缺少 OpenSSL 库,而 Nginx 的 SSL 模块需要这个库。你可以通过以下步骤来安装 OpenSSL 库:
解决方案
在 Debian/Ubuntu 系统上:
sudo apt-get update
sudo apt-get install libssl-dev
在 CentOS/RHEL 系统上:
sudo yum install openssl-devel
在 macOS 上(使用 Homebrew):
brew install openssl
安装完成后,重新运行 ./configure
脚本:
./configure
如果一切顺利,你应该不会再看到这个错误提示。如果你仍然遇到问题,可以尝试使用 --with-openssl
选项指定 OpenSSL 库的路径:
./configure --with-openssl=/path/to/openssl
请将 /path/to/openssl
替换为你实际安装 OpenSSL 库的路径。
更多推荐
所有评论(0)