nginx - nginx添加新模块时,配置组装出错

标签 nginx ffmpeg rtmp

在 Centos 6 上,我正在重建 nginx 以添加模块“nginx-rtmp-module-master”

./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid
--lock-path=/var/run/nginx.lock
--http-client-body-temp-path=/var/cache/nginx/client_temp
--http-proxy-temp-path=/var/cache/nginx/proxy_temp
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
--http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx
--group=nginx
--with-openssl=/builddir/build/BUILD/bx-nginx-1.16.1/openssl-1.1.1c
--with-openssl-opt=enable-tls1_3 --with-http_ssl_module
--with-http_realip_module --with-http_addition_module
--with-http_sub_module --with-http_dav_module --with-http_flv_module
--with-http_mp4_module --with-http_gunzip_module
--with-http_gzip_static_module --with-http_random_index_module
--with-http_secure_link_module --with-http_stub_status_module
--with-http_auth_request_module --with-http_v2_module --with-mail
--with-mail_ssl_module --with-file-aio --with-ipv6
--add-module=../nginx-rtmp-module-master

在控制台中配置完成后,如下:
....
configuring additional modules
adding module in ../nginx-rtmp-module-master
+ ngx_rtmp_module was configured
checking for PCRE library ... found
checking for PCRE JIT support ... not found
checking for zlib library ... found
creating objs/Makefile

Configuration summary
+ using system PCRE library
+ using OpenSSL library:
/builddir/build/BUILD/bx-nginx-1.16.1/openssl-1.1.1c
+ using system zlib library

nginx path prefix: "/etc/nginx"
nginx binary file: "/usr/sbin/nginx"
nginx modules path: "/etc/nginx/modules"
nginx configuration prefix: "/etc/nginx"
nginx configuration file: "/etc/nginx/nginx.conf"
nginx pid file: "/var/run/nginx.pid"
nginx error log file: "/var/log/nginx/error.log"
nginx http access log file: "/var/log/nginx/access.log"
nginx http client request body temporary files:
"/var/cache/nginx/client_temp"
nginx http proxy temporary files: "/var/cache/nginx/proxy_temp"
nginx http fastcgi temporary files: "/var/cache/nginx/fastcgi_temp"
nginx http uwsgi temporary files: "/var/cache/nginx/uwsgi_temp"
nginx http scgi temporary files: "/var/cache/nginx/scgi_temp"

./configure: warning: the "--with-ipv6" option is deprecated

尝试使用 make 构建后命令,我得到一个错误:
[root@216501 nginx-1.16.1]# make
make -f objs/Makefile
make[1]: Entering directory `/root/nginx-1.16.1'
cd /builddir/build/BUILD/bx-nginx-1.16.1/openssl-1.1.1c \
&& if [ -f Makefile ]; then make clean; fi \
&& ./config
--prefix=/builddir/build/BUILD/bx-nginx-1.16.1/openssl-1.1.1c/.openssl
no-shared no-threads enable-tls1_3 \
&& make \
&& make install_sw LIBDIR=lib
/bin/sh: line 0: cd:
/builddir/build/BUILD/bx-nginx-1.16.1/openssl-1.1.1c: No such file or
directory
make[1]: ***
[/builddir/build/BUILD/bx-nginx-1.16.1/openssl-1.1.1c/.openssl/include/openssl/ssl.h]
Error 1
make[1]: Leaving directory `/root/nginx-1.16.1'
make: *** [build] Error 2

如何修复错误以正确安装我需要的模块?

最佳答案

您的 openssl配置命令中的路径很可能是错误的

确保 /builddir/build/BUILD/bx-nginx-1.16.1/openssl-1.1.1c是正确的,包括所有 openssl 开发文件,如 include/openssl/ssl.h

关于nginx - nginx添加新模块时,配置组装出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58407240/

相关文章:

ffmpeg - 是否可以在 ffmpeg 的 -filter_complex 选项中同时使用 vidstabdetect 和 vidstabtransform ?

filter - 如何编写自己的捕获过滤器?

flash - 如何将不同的视频流式传输到同一个 RTMP URL?

delphi - LIBRTMP德尔福: mapping of the DLL

audio - FFMPEG - RTMP 到 HLS 没有音频输出

php - Mac 上的 Valet : 502 bad gateway when running test. dev,laravel,php 安装

http - 从 Report-To 标题获取弃用报告;正在生成报告但未发送

FFMPEG RTMP 在 Ubuntu 14.0.4 上的 red5pro 模块中不起作用

ruby-on-rails - 为 Rails 配置 nginx.conf 显示文件目录而不是索引

nginx - 使用 Nginx 蜜 jar 并使用黑名单、防火墙阻止 ip 或 fail2ban