笔记Mac下配置nginx+rtmp模块推流服务器碰到的问题:Error: This tap is now empty as all its formulae were migrated

安装环境 ,Mac版本 : 10.13.5

在装的nginx版本为1.13.12


安装命令见:https://blog.csdn.net/zjuwwj/article/details/72773704

如果你输入http://localhost:8080后能看到nginx配置的首页那说明OK。

或nginx -v看下版本号。都能确保装上.

下面是在挂装rtmp模块时出现的问题处理。

安装命令见:https://blog.csdn.net/leonpengweicn/article/details/44917943

安装tap时:brew tap homebrew/nginx  报was deprecated.

报下面这个错

Updating Homebrew...

==> Auto-updated Homebrew!

Updated 1 tap (homebrew/core).

==> Updated Formulae

abyss               docker2aci          libhttpseverywhere  subversion

amqp-cpp            emscripten          mypy                tup

chronograf          grpc                packmol             znapzend

dnscrypt-proxy      influxdb            rancher-cli


Error: homebrew/nginx was deprecated. This tap is now empty as all its formulae were migrated.

并不那么顺利,根查原因是因为homebrew/nginx的git路径变了。因此后面找到一个denji/nginx的。

把命令改为 brew tap denji/nginx

fsh-mac--00-24-D6-72-E4-6A:~ fengsh$ brew tap denji/nginx

Updating Homebrew...

==> Tapping denji/nginx

Cloning into '/usr/local/Homebrew/Library/Taps/denji/homebrew-nginx'...

remote: Counting objects: 72, done.

remote: Compressing objects: 100% (72/72), done.

remote: Total 72 (delta 1), reused 28 (delta 0), pack-reused 0

Unpacking objects: 100% (72/72), done.

Tapped 62 formulae (162 files, 130.2KB)

装好这个本以为就可以直接装rtmp模块了。

直接装rtmp命令 : brew install nginx-full --with-rtmp-module

fsh-mac--00-24-D6-72-E4-6A:~ fengsh$ brew install nginx-full --with-rtmp-module

==> Installing nginx-full from denji/nginx

Error: Cannot install denji/nginx/nginx-full because conflicting formulae are installed.

  nginx: because nginx-full symlink with the name for compatibility with nginx


Please `brew unlink nginx` before continuing.


Unlinking removes a formula's symlinks from /usr/local. You can

link the formula again after the install finishes. You can --force this

install, but the build may fail or cause obscure side-effects in the

resulting software.


又出问题了,denji的git下没有nginx-full?详细看错误有一句 please 'brew unlink nginx ' before continuing.

因此在执行装rtmp时先执行 brew unlink nginx 再来安装,最后成功了。

fsh-mac--00-24-D6-72-E4-6A:~ fengsh$ brew unlink nginx

Unlinking /usr/local/Cellar/nginx/1.13.12... 2 symlinks removed

fsh-mac--00-24-D6-72-E4-6A:~ fengsh$ brew install nginx-full --with-rtmp-module

Updating Homebrew...

==> Installing nginx-full from denji/nginx

==> Installing dependencies for denji/nginx/nginx-full: rtmp-nginx-module

==> Installing denji/nginx/nginx-full dependency: rtmp-nginx-module

==> Downloading https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive

==> Downloading from https://codeload.github.com/sergey-dryabzhinsky/nginx-rtmp-

######################################################################## 100.0%

==> Downloading https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/compare

######################################################################## 100.0%

==> Patching

==> Applying v1.1.7.10...d25c56f.diff

patching file .gitignore

patching file README.md

patching file config

patching file dash/ngx_rtmp_dash_module.c

patching file doc/README.md

patching file doc/directives.md

patching file hls/ngx_rtmp_hls_module.c

patching file hls/ngx_rtmp_mpegts.c

patching file hls/ngx_rtmp_mpegts.h

patching file hls/ngx_rtmp_mpegts_crc.c

patching file hls/ngx_rtmp_mpegts_crc.h

patching file ngx_rtmp.c

patching file ngx_rtmp_auto_push_module.c

patching file ngx_rtmp_cmd_module.h

patching file ngx_rtmp_codec_module.c

patching file ngx_rtmp_core_module.c

patching file ngx_rtmp_exec_module.c

patching file ngx_rtmp_handshake.c

patching file ngx_rtmp_live_module.c

patching file ngx_rtmp_live_module.h

patching file ngx_rtmp_netcall_module.c

patching file ngx_rtmp_notify_module.c

patching file ngx_rtmp_record_module.c

patching file ngx_rtmp_record_module.h

patching file ngx_rtmp_shared.c

patching file ngx_rtmp_version.h

 配置文件 open /usr/local/etc/nginx 下的nginx.conf

[plain]  view plain  copy
  1. #user  nobody;  
  2. worker_processes  1;  
  3.   
  4. events {  
  5.     worker_connections  1024;  
  6. }  
  7.   
  8.   
  9. http {  
  10.     include       mime.types;  
  11.     default_type  application/octet-stream;  
  12.   
  13.     sendfile        on;  
  14.       
  15.     keepalive_timeout  65;  
  16.     server {  
  17.         listen       8080;  
  18.         server_name  localhost;  
  19.   
  20.         #charset koi8-r;  
  21.   
  22.         #access_log  logs/host.access.log  main;  
  23.   
  24.         location / {  
  25.             root   html;  
  26.             index  index.html index.htm;  
  27.         }  
  28.           
  29.         #配置rtmp stat  
  30.         location /stat {  
  31.           rtmp_stat all;  
  32.           rtmp_stat_stylesheet stat.xsl;  
  33.         }  
  34.         location /stat.xsl {  
  35.             root /usr/local/Cellar/rtmp-nginx-module/1.1.7.11-dev_2/share/rtmp-nginx-module;  
  36.         }  
  37.   
  38.         location /control {  
  39.           rtmp_control all;  
  40.         }  
  41.   
  42.         #HLS配置开始,这个配置为了`客户端`能够以http协议获取HLS的拉流  
  43.         location /hls {  
  44.             # Serve HLS fragments  
  45.             types {  
  46.                 application/vnd.apple.mpegurl m3u8;  
  47.                 video/mp2t ts;  
  48.             }  
  49.             root html;  
  50.             add_header Cache-Control no-cache;  
  51.         }  
  52.         #HLS配置结束  
  53.   
  54.         #error_page  404              /404.html;  
  55.   
  56.         # redirect server error pages to the static page /50x.html  
  57.         #  
  58.         error_page   500 502 503 504  /50x.html;  
  59.         location = /50x.html {  
  60.             root   html;  
  61.         }  
  62.     }  
  63.   
  64.   
  65.       
  66.     include servers/*;  
  67. }  
  68.   
  69. rtmp {  
  70.     server {  
  71.         listen 1935;  
  72.         ping 30s;  
  73.         notify_method get;  
  74.   
  75.         application myapp {  
  76.             live on;  
  77.             record off;  
  78.         max_connections 1024;  
  79.         }  
  80.   
  81.     #增加对HLS支持开始  
  82.     application hls {  
  83.         live on;  
  84.         hls on;  
  85.         hls_path /usr/local/var/www/hls;  
  86.         hls_fragment 5s;  
  87.     }  
  88.     #增加对HLS支持结束  
  89.     }  
  90. }  
有关rtmp的配置项看这个: https://www.cnblogs.com/lidabo/p/7099501.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值