使用njs编译nginx有什么错误?例如:
下载:
# cd /usr/src/
# git clone https://github.com/nginx/njs.git
# wget http://nginx.org/download/nginx-1.10.1.tar.gz
# tar -zxf nginx-1.10.1.tar.gz
配置确定:
# cd nginx-1.10.1
# ./configure --add-dynamic-module=../njs/nginx
...
adding module in ../njs/nginx
+ ngx_js_module was configured
...
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1: using system crypto library
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
并犯错:
# make
...
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../njs/nginx/../nxt -I ../njs/nginx/../njs -I ../njs/nginx/../nxt -I ../njs/nginx/../njs -I objs -I src/http -I src/http/modules \
-o objs/addon/nginx/ngx_stream_js_module.o \
../njs/nginx/ngx_stream_js_module.c
../njs/nginx/ngx_stream_js_module.c:10:24: fatal error: ngx_stream.h: no such file or directory
#include <ngx_stream.h>
^
compilation terminated.
make[1]: ** [objs/addon/nginx/ngx_stream_js_module.o] Erro 1
make[1]: Saindo do diretório `/usr/src/nginx-1.10.1'
make: ** [build] Erro 2
网站:github.com/nginx/njs
自述文件:github.com/nginx/njs/blob/master/README
订购:www.nginx.com/resources/wiki/nginScript /