html tool

2024年6月11日星期二

nginx编译知道openssl源码,make提示/bin/sh: line 0: cd: auto/lib/openssl/conf: Not a directory 的解决

 问题:

编译参数:

./configure --prefix=/usr/local/nginx --with-openssl=/tool/openssl1.1.0w --with-http_stub_status_module  --with-http_v2_module  --with-http_gzip_static_module  --with-http_sub_module --with-stream --with-stream_ssl_module  --with-http_realip_module  --with-http_gzip_static_module --with-http_ssl_module

结果make是提示问题如下:

# make

make -f objs/Makefile
make[1]: Entering directory `/tool/nginx-1.27.0'
cd auto/lib/openssl/conf \
&& if [ -f Makefile ]; then make clean; fi \
&& ./config --prefix=/tool/nginx-1.27.0/auto/lib/openssl/conf/.openssl no-shared no-threads  \
&& make \
&& make install_sw LIBDIR=lib
/bin/sh: line 0: cd: auto/lib/openssl/conf: Not a directory
make[1]: *** [auto/lib/openssl/conf/.openssl/include/openssl/ssl.h] Error 1
make[1]: Leaving directory `/root/tool/nginx-1.27.0'
make: *** [build] Error 2

解决方式:
将openssl1.1.0w的目录移动为openssl修改编译参数中的
--with-openssl=/tool/openssl1.1.0w
--with-openssl=/tool/openssl 
在编译和make就可以了
PS:我在nginx1.24.0/1.27.0上都遇到这个问题,go了一下大家都在改Makefile文件中的引用,反向改改也ok,想来是./configure脚本对path中的.处理有bug吧

没有评论:

发表评论