При добавлении нового модуля в nginx произошла ошибка в сборке конфигурации - PullRequest
0 голосов
/ 16 октября 2019

В 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

Как исправить ошибку, чтобы правильно установить нужный мне модуль?

1 Ответ

0 голосов
/ 16 октября 2019

Ваш openssl путь в команде конфигурации, скорее всего, неверен

Убедитесь, что /builddir/build/BUILD/bx-nginx-1.16.1/openssl-1.1.1c указан правильно и включает все файлы разработки openssl, например include/openssl/ssl.h

...