免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 15456 | 回复: 10
打印 上一主题 下一主题

[Web] nginx安装问题!!急 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-10 12:02 |只看该作者 |倒序浏览
系统是rhel5的 nginx版本:nginx-0.7.30
我进去以后./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

Configuration summary
  + using system PCRE library
  + OpenSSL library is not found
  + md5 library is not used
  + sha1 library is not used
  + zlib library is not found

有这样的报错 可是看有的帖子说可以不用管 继续make

make后又报错

make[1]: *** [objs/src/event/ngx_event_openssl.o] Error 1
make[1]: Leaving directory `/home/admin/software/nginx-0.7.30'
make: *** [build] Error 2

后来我指定目录
./configure --prefix=/usr/nginx --with-http_stub_status_module --with-http_ssl_module --with-openssl=/lib/libssl.so.0.9.8e --with-zlib=/usr/lib/libz.so.1

(OpenSSL zlib md5 sha1  这些都是rpm默认安装的  md5 和sha1  我还没有找到在哪)

之后make又报错
cc1: error: /lib/libssl.so.0.9.8e/include: Not a directory
cc1: error: /usr/lib/libz.so.1: not a directory
make[1]: *** [objs/src/core/nginx.o] Error 1
make[1]: Leaving directory `/home/admin/software/nginx-0.7.30'
make: *** [build] Error 2


怎么办啊 求救~~谢谢

论坛徽章:
0
2 [报告]
发表于 2009-12-10 12:14 |只看该作者
在线等啊~~~ 求救啊~

论坛徽章:
39
白银圣斗士
日期:2015-11-24 10:40:40酉鸡
日期:2015-03-20 14:15:44寅虎
日期:2015-03-20 14:13:59午马
日期:2015-03-20 14:13:16白羊座
日期:2015-03-20 14:12:54金牛座
日期:2015-03-20 14:12:09双子座
日期:2015-03-20 14:11:57巨蟹座
日期:2015-03-20 14:11:44狮子座
日期:2015-03-20 14:11:29亥猪
日期:2015-03-20 14:16:24戌狗
日期:2015-03-20 14:16:40申猴
日期:2015-03-20 14:17:05
3 [报告]
发表于 2009-12-10 12:20 |只看该作者
--with-openssl=/lib/libssl.so.0.9.8e
指定openssl的安装目录
你看下/lib/libssl.so.0.9.8e 这个目录是不是存在

--with-zlib=/usr/lib/libz.so.1
这个是要指定路径,而不是文件
--with-zlib=/usr/lib
这样就可以了

论坛徽章:
0
4 [报告]
发表于 2009-12-10 12:34 |只看该作者

回复 #3 rover12421 的帖子

[root@loadbalancer nginx-0.7.17]# ls /usr/lib/libz.so.1
libz.so.1      libz.so.1.2.3

[root@loadbalancer nginx-0.7.17]# ls /lib/libss
libssl.so.0.9.8e  libssl.so.6       libss.so.2        libss.so.2.0

都有啊
./configure --user=www --group=www  --prefix=/usr/nginx --with-http_stub_status_module --with-http_ssl_module --with-openssl=/lib/ --with-zlib=/usr/lib/

make的时候
[root@loadbalancer nginx-0.7.17]# make
make -f objs/Makefile
make[1]: Entering directory `/home/admin/software/nginx-0.7.17'
gcc -c -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /lib//include -I /usr/lib/ -I objs \
                -o objs/src/core/nginx.o \
                src/core/nginx.c
In file included from src/core/ngx_core.h:70,
                 from src/core/nginx.c:8:
src/event/ngx_event_openssl.h:14:25: error: openssl/ssl.h: No such file or directory
src/event/ngx_event_openssl.h:15:25: error: openssl/err.h: No such file or directory
In file included from src/core/ngx_core.h:70,
                 from src/core/nginx.c:8:
src/event/ngx_event_openssl.h:31: error: expected specifier-qualifier-list before â

论坛徽章:
0
5 [报告]
发表于 2009-12-10 18:12 |只看该作者
yum install openssl-devel

论坛徽章:
0
6 [报告]
发表于 2010-03-31 17:45 |只看该作者
[root@localhost nginx-0.7.62]# make
make -f objs/Makefile
make[1]: Entering directory `/root/nginx/nginx-0.7.62'
cd /usr/local/ssl/include/openssl \
        && make clean \
        && ./config --prefix=/usr/local/ssl/include/openssl/openssl no-shared  no-threads \
        && make \
        && make install
make[2]: Entering directory `/usr/local/ssl/include/openssl'
make[2]: *** No rule to make target `clean'.  Stop.
make[2]: Leaving directory `/usr/local/ssl/include/openssl'
make[1]: *** [/usr/local/ssl/include/openssl/openssl/include/openssl/ssl.h] Error 2
make[1]: Leaving directory `/root/nginx/nginx-0.7.62'
make: *** [build] Error 2

像这个错误,请升级openssl
升级方法如下:
Linux下升级OpenSSL

升级步骤

0. 首先通过 #openssl version –a 查看系统中存在的OpenSSL版本号

1. 通过#wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz 获得0.9.8g的源码包

2. 安装openssl

#tar –xzvf openssl-0.9.8g.tar.gz
#cd openssl-0.9.8g
#./config shared zlib
#make
#make install
mv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
ln –s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln –s /usr/local/ssl/include/openssl /usr/include/openssl

3 配置库文件搜索路径

#echo “/usr/local/ssl/lib” >> /etc/ld.so.conf
#ldconfig –v

4 查看openssl 版本号,验证安装正确性

#openssl version –a

可以看到是新装好的0.9.8g版

论坛徽章:
0
7 [报告]
发表于 2010-03-31 20:38 |只看该作者
有人掏古董~

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
8 [报告]
发表于 2010-03-31 21:40 |只看该作者
我centos5.3从来没出现过这种情况!

论坛徽章:
0
9 [报告]
发表于 2010-08-03 13:21 |只看该作者
ssl没有安装吧?或者没有指对路径。

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:49:03
10 [报告]
发表于 2011-04-10 11:53 |只看该作者
我现在也遇到这个问题,你是编译perlmodule了吧?

看了一眼那个.h代码 里面
include openssl/ssl.h
include openssl/engine.h
等等,怀疑是不是得在那个目录下面建立个openssl文件夹
在想办法呢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP