问题描述:
在Mac上用 brew install nginx-full --with-rtmp-module
安装 nginx 和 rtmp-module 报错 invalid option: --with-rtmp-module。
报错内容如下:
Usage: brew install [options] formula
Install formula. Additional options specific to formula may be appended to the command.
Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for
the installed formulae or, every 30 days, for all formulae.
...
Error: invalid option: --with-rtmp-module
问题解决:
# 克隆到本地
$ brew tap denji/homebrew-nginx
# 安装nginx-full和rtmp
$ brew install nginx-full --with-rtmp-module
安装过程:
$ brew tap denji/homebrew-nginx
==> Tapping denji/nginx
Cloning into '/usr/local/Homebrew/Library/Taps/denji/homebrew-nginx'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 3072 (delta 6), reused 2 (delta 2), pack-reused 3057
Receiving objects: 100% (3072/3072), 682.98 KiB | 5.00 KiB/s, done.
Resolving deltas: 100% (1743/1743), done.
Tapped 64 formulae (95 files, 862.7KB).
$ brew install nginx-full --with-rtmp-module
Updating Homebrew...
==> Installing nginx-full from denji/nginx
==> Installing dependencies for denji/nginx/nginx-full: pcre and rtmp-nginx-module
==> Installing denji/nginx/nginx-full dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.44.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/f8/f8ac266e04f984fa55091a43f0fdc39a40d57c2489d289a186c88cce
######################################################################## 100.0%
==> Pouring pcre-8.44.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/pcre/8.44: 204 files, 5.5MB
==> Installing denji/nginx/nginx-full dependency: rtmp-nginx-module
==> Downloading https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/v1.1.7.10.tar.gz
==> Downloading from https://codeload.github.com/sergey-dryabzhinsky/nginx-rtmp-module/tar.gz/v1.1.7.10
-=O=- # ###
==> Downloading https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/compare/v1.1.7.10..504b9ee.diff
######################################################################## 100.0%
==> Patching
==> Applying v1.1.7.10..504b9ee.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_access_module.c
patching file ngx_rtmp_amf.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_eval.c
patching file ngx_rtmp_exec_module.c
patching file ngx_rtmp_handshake.c
patching file ngx_rtmp_init.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
🍺 /usr/local/Cellar/rtmp-nginx-module/1.1.7.11-dev_3: 94 files, 1.4MB, built in 5 minutes 10 seconds
==> Installing denji/nginx/nginx-full --with-rtmp-module
==> Downloading https://nginx.org/download/nginx-1.17.8.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/nginx-full/1.17.8 --with-http_ssl_module --with-pcre --with-ipv6
==> make install
==> Caveats
Docroot is: /usr/local/var/www
The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.
nginx will load all files in /usr/local/etc/nginx/servers/.
- Tips -
Run port 80:
$ sudo chown root:wheel /usr/local/opt/nginx-full/bin/nginx
$ sudo chmod u+s /usr/local/opt/nginx-full/bin/nginx
Reload config:
$ nginx -s reload
Reopen Logfile:
$ nginx -s reopen
Stop process:
$ nginx -s stop
Waiting on exit process
$ nginx -s quit
To have launchd start denji/nginx/nginx-full now and restart at login:
brew services start denji/nginx/nginx-full
Or, if you don't want/need a background service you can just run:
nginx
==> Summary
🍺 /usr/local/Cellar/nginx-full/1.17.8: 8 files, 1.3MB, built in 5 minutes 15 seconds
==> Caveats
==> nginx-full
Docroot is: /usr/local/var/www
The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.
nginx will load all files in /usr/local/etc/nginx/servers/.
- Tips -
Run port 80:
$ sudo chown root:wheel /usr/local/opt/nginx-full/bin/nginx
$ sudo chmod u+s /usr/local/opt/nginx-full/bin/nginx
Reload config:
$ nginx -s reload
Reopen Logfile:
$ nginx -s reopen
Stop process:
$ nginx -s stop
Waiting on exit process
$ nginx -s quit
To have launchd start denji/nginx/nginx-full now and restart at login:
brew services start denji/nginx/nginx-full
Or, if you don't want/need a background service you can just run:
nginx
网友评论