您的位置:首页 > 运维架构 > Nginx

编译安装nginx遇到的问题

2012-12-24 19:46 926 查看
一、源码包获取

[root@Bookmark1 tmp]# wget http://agentzh.org/misc/nginx/ngx_openresty-1.2.1.14.tar.gz

二、安装

[root@Bookmark1 tmp]# tar -zxvf ngx_openresty-1.2.1.14.tar.gz

[root@Bookmark1 tmp]# cd ngx_openresty-1.2.1.14

[root@Bookmark1 ngx_openresty-1.2.1.14]# ./configure --prefix=/usr/local/ngx_openresty --with-luajit --with-http_stub_status_module

make时报错如下:

al/ngx_openresty/luajit/lib -lluajit-5.1 -lm -lpcre -lssl -lcrypto -ldl -lz

objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_ecdh_curve':

ngx_event_openssl.c:(.text+0xace): undefined reference to `EC_KEY_new_by_curve_name'

ngx_event_openssl.c:(.text+0xb4d): undefined reference to `EC_KEY_free'

objs/src/http/ngx_http_request.o: In function `ngx_http_ssl_servername':

ngx_http_request.c:(.text+0xcfe): undefined reference to `SSL_get_servername'

ngx_http_request.c:(.text+0xe06): undefined reference to `SSL_set_SSL_CTX'

collect2: ld 返回 1

make[2]: *** [objs/nginx] 错误 1

make[2]: Leaving directory `/tmp/ngx_openresty-1.2.1.14/build/nginx-1.2.1'

make[1]: *** [build] 错误 2

make[1]: Leaving directory `/tmp/ngx_openresty-1.2.1.14/build/nginx-1.2.1'

make: *** [all] 错误 2

解决:

[root@Bookmark1 ngx_openresty-1.2.1.14]# ./configure --prefix=/usr/local/ngx_openresty --with-http_ssl_module --with-luajit --with-http_stub_status_module --with-openssl=/opt/distfiles/openssl-0.9.8k(openssl的源码包的地址,不是安装路径)
本文出自 “屌丝运维男” 博客,请务必保留此出处http://navyaijm.blog.51cto.com/4647068/1098502
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: