使用模块编译Nginx配置失败

时间:2019-04-12 16:47:14

标签: ubuntu nginx config

您好,我正在尝试在ubuntu数字海洋飞沫上编译nginx的配置,并正在按照本教程进行操作

https://dev.to/samuyi/how-to-setup-nginx-for-hls-video-streaming-on-centos-7-3jb8

但是,当我尝试在下面的控制台中运行此教程时,

./configure  --add-module=../nginx-rtmp-module \
--sbin-path=/usr/sbin/nginx \ 
--lock-path=/var/run/nginx.lock \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/run/nginx.pid \   
--with-pcre=../pcre-8.42 \    
--with-zlib=../zlib-1.2.11 \  
--with-openssl=../openssl-1.0.2q \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--user=nginx \                 
--group=nginx \                
--with-http_auth_request_module \
--with-http_degradation_module \
--with-http_geoip_module \     
--with-http_gunzip_module \    
--with-http_gzip_static_module \
--with-http_image_filter_module \
--with-http_mp4_module \
--with-http_perl_module \
--with-http_realip_module \
--with-http_secure_link_module \
--with-http_slice_module \
--with-http_ssl_module  \
--with-http_stub_status_module \
--with-http_v2_module \
--with-stream_ssl_module \
--with-stream \
--with-threads \
--prefix=/etc/nginx

我遇到此错误,无法编译,我不确定发生了什么,或者如果我错误地粘贴了它,则任何建议都将不胜感激。

root@ubuntu-s-1vcpu-1gb-sfo2-01:~/nginx-1.15.9# ./configure  --add-module=../nginx-rtmp-module \
> --sbin-path=/usr/sbin/nginx \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--user=nginx \
--group=nginx \
--with-http_auth_request_module \
--with-http_degradation_module \
--with-http_geoip_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_image_filter_module \
--with-http_mp4_module \
--with-http_perl_module \
--with-http_realip_module \
--with-http_secure_link_module \
--with-http_slice_module \
--with-http_ssl_module  \
--with-http_stub_status_module \
--with-http_v2_module \
--with-stream_ssl_module \
--with-stream \
--with-threads \
--prefix=/etc/nginx./configure: error: invalid option " "
root@ubuntu-s-1vcpu-1gb-sfo2-01:~/nginx-1.15.9# --lock-path=/var/run/nginx.lock \
> --conf-path=/etc/nginx/nginx.conf \
> --pid-path=/run/nginx.pid \
-bash: --lock-path=/var/run/nginx.lock: No such file or directory
root@ubuntu-s-1vcpu-1gb-sfo2-01:~/nginx-1.15.9# --with-pcre=../pcre-8.42 \
-bash: --with-pcre=../pcre-8.42: No such file or directory
root@ubuntu-s-1vcpu-1gb-sfo2-01:~/nginx-1.15.9# --with-zlib=../zlib-1.2.11 \
-bash: --with-zlib=../zlib-1.2.11: No such file or directory
root@ubuntu-s-1vcpu-1gb-sfo2-01:~/nginx-1.15.9# --with-openssl=../openssl-1.0.2q \
> --error-log-path=/var/log/nginx/error.log \
> --http-log-path=/var/log/nginx/access.log \
> --user=nginx \
-bash: --with-openssl=../openssl-1.0.2q: No such file or directory
root@ubuntu-s-1vcpu-1gb-sfo2-01:~/nginx-1.15.9# --group=nginx \
--group=nginx: command not found
root@ubuntu-s-1vcpu-1gb-sfo2-01:~/nginx-1.15.9# --with-http_auth_request_module \
> --with-http_degradation_module \
> --with-http_geoip_module \
--with-http_auth_request_module: command not found
root@ubuntu-s-1vcpu-1gb-sfo2-01:~/nginx-1.15.9# --with-http_gunzip_module \
--with-http_gunzip_module: command not found
root@ubuntu-s-1vcpu-1gb-sfo2-01:~/nginx-1.15.9# --with-http_gzip_static_module \
> --with-http_image_filter_module \
> --with-http_mp4_module \
> --with-http_perl_module \
> --with-http_realip_module \
> --with-http_secure_link_module \
> --with-http_slice_module \
> --with-http_ssl_module  \
> --with-http_stub_status_module \
> --with-http_v2_module \
> --with-stream_ssl_module \
> --with-stream \
> --with-threads \
> --prefix=/etc/nginx

谢谢您的时间:)

1 个答案:

答案 0 :(得分:0)

没关系,我发现删除的每个模块的/后面都有多余的空间,它可以正常工作:)