【问题标题】:nginx: [emerg] unknown directive "gop_cache"nginx:[emerg] 未知指令“gop_cache”
【发布时间】:2020-04-09 13:02:27
【问题描述】:

我的nginx配置如下:

  rtmp {
    server {
        listen 1935;
        chunk_size 4000;
        application live {
            live on;
            record off;
            #publish_notify on;
            #on_publish http://localhost/auth.php;

            hls on;
            hls_path /home/hls/test;
            hls_fragment 3s;
            hls_playlist_length 32s;
            meta on;
            gop_cache on;
        }
    }
}

但我在重新加载时收到此错误:

nginx:[emerg] 未知指令“gop_cache”在 /usr/local/nginx/conf/nginx.conf:133

而我的 nginx 版本是:

nginx version: nginx/1.8.1
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12)
built with OpenSSL 1.0.2g  1 Mar 2016
TLS SNI support enabled
configure arguments: --with-http_ssl_module --add-module=../nginx-rtmp-module-master

【问题讨论】:

    标签: nginx


    【解决方案1】:

    您安装的nginx 没有安装nginx 模块nginx-rtmp-module-master。

    如果你从源代码安装nginx,你需要--add-module=nginx-rtmp-module-master

    例如:

    ./configure --add-module=/path/to/nginx-http-flv-module
    make
    make install
    

    Here is the official description

    【讨论】:

    猜你喜欢
    • 2013-10-12
    • 2013-10-10
    • 2021-08-30
    • 2011-07-15
    • 2020-02-17
    • 1970-01-01
    • 1970-01-01
    • 2018-11-23
    • 1970-01-01
    相关资源
    最近更新 更多