没有使目标“远离”的规则.编译开放时停止

  • 本文关键字:编译 规则 目标 远离 linux
  • 更新时间 :
  • 英文 :


当我使用此命令编译Openresty(1.13.6.2(时:

# configure openresty
./configure --with-pcre=/usr/local/pcre-8.43 --with-openssl=/usr/local/openssl-1.0.2r --with-zlib=/usr/local/lib
# make openresty  
gmake

执行此命令时,会抛出此错误:

gmake[1]: Entering directory `/usr/local/openresty-1.13.6.2/build/lua-rds-parser-0.06'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/local/openresty-1.13.6.2/build/lua-rds-parser-0.06'
cd /usr/local/openresty-1.13.6.2/build/nginx-1.13.6 && gmake
gmake[1]: Entering directory `/usr/local/openresty-1.13.6.2/build/nginx-1.13.6'
gmake -f objs/Makefile
gmake[2]: Entering directory `/usr/local/openresty-1.13.6.2/build/nginx-1.13.6'
cd /usr/local/lib 
        && gmake distclean 
        && CFLAGS="-O2 -fomit-frame-pointer -pipe " CC="cc" 
                ./configure 
        && gmake libz.a
gmake[3]: Entering directory `/usr/local/lib'
gmake[3]: *** No rule to make target `distclean'.  Stop.
gmake[3]: Leaving directory `/usr/local/lib'
gmake[2]: *** [/usr/local/lib/libz.a] Error 2
gmake[2]: Leaving directory `/usr/local/openresty-1.13.6.2/build/nginx-1.13.6'
gmake[1]: *** [build] Error 2
gmake[1]: Leaving directory `/usr/local/openresty-1.13.6.2/build/nginx-1.13.6'
gmake: *** [all] Error 2

哪里出了问题?如何解决这个问题?

使用 zlib 源代码文件夹来配置:

./configure --with-pcre=/usr/local/pcre-8.43 --with-openssl=/usr/local/openssl-1.0.2r --with-zlib=/usr/local/zlib2.8-src

使用源文件夹,而不是安装输出文件夹。

最新更新