安装Nginx1.x以上版本 make报错

# wget http://nginx.org/download/nginx-1.10.1.tar.gz
# tar xf nginx-1.10.1.tar.gz -C /usr/local/web/
# cd /usr/local/web/nginx-1.10.1/
# useradd nginx
# id nginx
uid=502(nginx) gid=502(nginx) groups=502(nginx)
# ./configure   \ 
--user=nginx    \
--group=nginx   \
--with-http_realip_module  \ 
--with-http_stub_status_module  \
--with-http_gzip_static_module  \
--with-md5=/usr/local/web/md5  \
--with-sha1=auto/lib/sha1  \
--with-pcre=/usr/local/web/pcre-8.01  \
--without-select_module  \
--without-poll_module  \
--without-http_ssi_module  \
--without-http_userid_module  \
--without-http_geo_module  \
--without-http_map_module  \
--without-http_memcached_module \
--without-mail_pop3_module   \
--without-mail_imap_module   \
--without-mail_smtp_module   \
--prefix=/usr/local/nginx-1.10.1  

报错:

In file included from src/core/ngx_crypt.c:12:
src/core/ngx_sha1.h:19:17: error: sha.h: No such file or directory
In file included from src/core/ngx_crypt.c:12:
src/core/ngx_sha1.h:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ngx_sha1_t'
src/core/ngx_crypt.c: In function 'ngx_crypt_ssha':
src/core/ngx_crypt.c:204: error: 'ngx_sha1_t' undeclared (first use in this function)
src/core/ngx_crypt.c:204: error: (Each undeclared identifier is reported only once
src/core/ngx_crypt.c:204: error: for each function it appears in.)
src/core/ngx_crypt.c:204: error: expected ';' before 'sha1'
cc1: warnings being treated as errors
src/core/ngx_crypt.c:228: error: implicit declaration of function 'SHA1_Init'
src/core/ngx_crypt.c:228: error: 'sha1' undeclared (first use in this function)
src/core/ngx_crypt.c:229: error: implicit declaration of function 'SHA1_Update'
src/core/ngx_crypt.c:231: error: implicit declaration of function 'SHA1_Final'
src/core/ngx_crypt.c: In function 'ngx_crypt_sha':
src/core/ngx_crypt.c:255: error: 'ngx_sha1_t' undeclared (first use in this function)
src/core/ngx_crypt.c:255: error: expected ';' before 'sha1'
src/core/ngx_crypt.c:263: error: 'sha1' undeclared (first use in this function)
make[1]: *** [objs/src/core/ngx_crypt.o] Error 1
make[1]: Leaving directory `/software/nginx-1.6.2'
make: *** [build] Error 2

同样的编译参数,安装nginx-0.8.55就没问题......

 

posted @ 2016-09-02 21:18  Jelly_lyj  阅读(557)  评论(0编辑  收藏  举报