我正在尝试安装 nginx,无论我做什么,nginx 似乎都找不到我的 openssl 路径。看起来它正在搜索任何 openssl 目录中都不存在的文件。下面是我的 make 输出。我试图为 nginx 指定各种路径来查找 openssl。
[root@server nginx-0.8.54]# make
make -f objs/Makefile
make[1]: Entering directory `/root/nginx-0.8.54'
cd /usr/local/ssl \
&& make clean \
&& ./config --prefix=/usr/local/ssl/.openssl no-shared no-threads \
&& make \
&& make install LIBDIR=lib
make[2]: Entering directory `/usr/local/ssl'
make[2]: *** No rule to make target `clean'. Stop.
make[2]: Leaving directory `/usr/local/ssl'
make[1]: *** [/usr/local/ssl/.openssl/include/openssl/ssl.h] Error 2
make[1]: Leaving directory `/root/nginx-0.8.54'
make: *** [build] Error 2
Run Code Online (Sandbox Code Playgroud)
有没有人对此有任何想法?
小智 6
当您的 nginxconfigure
使用相对路径时,也会发生这种情况。如果使用完整路径 from ,它会更可靠地找到库/
。
不起作用: ./configure --with-openssl=../openssl-source
作品: ./configure --with-openssl=/home/build/src/openssl-source
小智 0
openssl 标头通常由libssl-dev
Ubuntu 提供。nginx还有一个--with-openssl=DIR
./configure
选项可以让您手动指定 openssl 源的路径。为什么您从源代码构建它而不是使用包管理器?