Nginx安装加载ssl错误

make -f objs/Makefile

make[1]: 进入目录“/opt/nginx-1.14.0”

cd /usr/include/openssl \

&& if [ -f Makefile ]; then make clean; fi \

&& ./config --prefix=/usr/include/openssl/.openssl no-shared no-threads \

&& make \

&& make install_sw LIBDIR=lib

/bin/sh:行2: ./config: 没有那个文件或目录

make[1]: *** [/usr/include/openssl/.openssl/include/openssl/ssl.h] 错误 127

make[1]: 离开目录“/opt/nginx-1.14.0”

make: *** [build] 错误 2

出现这个问题决绝办法:将你编译代命了也就是 --with-openssl=DIR这个路径指向你的源码安装包路径而不是你安装后的路径!

–with-pcre force PCRE library usage 使用默认的pcre库,默认使用系统自带的pcre
–with-pcre=DIR set path to PCRE library sources 使用自己安装的pcre
–with-pcre Nginx的rewrite功能需要使用pcre库才能工作,而Nginx的编译参数里面的这个选项并不是像常规的那样指定pcre的安装目录,而是指定pcre源代码的目录。

也就是说,如果你的系统路径下已经可以找到pcre的lib和include文件,这个选项可以不指定了。如果你的系统没有安装pcre,那么就指定该选项,Nginx会在编译的时候从你指定的这个目录把pcre编译进来。

–with-openssl

–with-zlib

–with-md5

–with-sha1

这几个选项跟pcre一样,指定的是源代码目录,不是这些类库的安装目录。

编译方法:
./configure --with-http_ssl_module --with-openssl=/usr/local/openssl-1.0.1t
make
然后替换主程序

  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值