安装nginx出错处理error: passing 'ngx_sockaddr_t' to parameter of

今天在安装nginx时出现如下问题:

执行命令

brew install nginx-full --with-rtmp-module

报错:

cctv-yinyong:~ yinyong$ brew install nginx-full --with-rtmp-module
==> Installing nginx-full from homebrew/nginx
==> Downloading https://nginx.org/download/nginx-1.12.0.tar.gz
Already downloaded: /Users/yinyong/Library/Caches/Homebrew/nginx-full-1.12.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/nginx-full/1.12.0 --with-http_ssl_mod
==> make install
Last 15 lines from /Users/yinyong/Library/Logs/Homebrew/nginx-full/02.make:
#define ngx_memcmp(s1, s2, n)  memcmp((const char *) s1, (const char *) s2, n)
                                                                        ^~
/usr/local/share/rtmp-nginx-module/ngx_rtmp_core_module.c:568:30: error: passing 'ngx_sockaddr_t' to parameter of incompatible type 'const void *'
    ngx_memcpy(ls->sockaddr, u.sockaddr, u.socklen);
                             ^~~~~~~~~~
src/core/ngx_string.h:102:54: note: expanded from macro 'ngx_memcpy'
#define ngx_memcpy(dst, src, n)   (void) memcpy(dst, src, n)
                                                     ^~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/secure/_string.h:65:33: note: expanded from macro 'memcpy'
  __builtin___memcpy_chk (dest, src, len, __darwin_obsz0 (dest))
                                ^~~
2 errors generated.
make[1]: *** [objs/addon/rtmp-nginx-module/ngx_rtmp_core_module.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2

READ THIS: http://docs.brew.sh/Troubleshooting.html

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in `parse': Failed to parse JSON response (GitHub::Error)
399: unexpected token at '{
      "url": "https://api.github.com/repos/Homebrew/homebr

尝试连接给定的url寻求帮助http://docs.brew.sh/Troubleshooting.html
之前还有一个链接,这里没显示,附上https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/issues/234
解决办法:

1, 去https://github.com/sergey-dryabzhinsky/nginx-rtmp-module上下载最新的zip;解压
2, 将解压的文件替换掉在/usr/local/share/rtmp-nginx-module/路径下的文件;
3, 再次在终端中输入命令brew install nginx-full --with-rtmp-module 问题解决

你可能感兴趣的:(安装nginx出错处理error: passing 'ngx_sockaddr_t' to parameter of)