nginx -with--openssl make报错解决方法

nginx -with--openssl  make报错解决方法

## 若报错
 /opt/nginx-1.18.0]# make
make -f objs/Makefile
make[1]: Entering directory `/opt/nginx-1.18.0'
cd /usr/local/openssl \
    && if [ -f Makefile ]; then make clean; fi \
    && ./config --prefix=/usr/local/openssl/.openssl no-shared no-threads  \
    && make \
    && make install_sw LIBDIR=lib
/bin/sh: line 2: ./config: No such file or directory
make[1]: *** [/usr/local/openssl/.openssl/include/openssl/ssl.h] Error 127
make[1]: Leaving directory `/opt/nginx-1.18.0'
make: *** [build] Error 2
修需要修改/nginx-1.18.0目录下的/auto/lib/openssl/conf的openssl目录
cd   /opt/nginx-1.18.0/auto/lib/openssl
vim conf
            CORE_INCS="$CORE_INCS $OPENSSL/include"
            CORE_DEPS="$CORE_DEPS $OPENSSL/include/openssl/ssl.h"
            CORE_LIBS="$CORE_LIBS $OPENSSL/lib/libssl.a"
            CORE_LIBS="$CORE_LIBS $OPENSSL/lib/libcrypto.a"
            CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
            CORE_LIBS="$CORE_LIBS $NGX_LIBPTHREAD"

## 然后重新configure

## 再make

 

posted @ 2024-05-21 09:49  newmiracle宇宙  阅读(443)  评论(0编辑  收藏  举报