make[1]: *** [/usr/local/pcre//Makefile] Error 127

简介:

环境 nginx 1.0.5

configure 配置通过

./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/pcre/  --with-openssl=/usr/local/openssl/ --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --http-client-body-temp-path=/var/tmp/nginx/client/  --http-proxy-temp-path=/var/tmp/nginx/proxy/ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --user=nginx  --group=nginx

make 错误

[root@nginx nginx-1.0.5]# make
make -f objs/Makefile
make[1]: Entering directory `/root/nginx/nginx-1.0.5'
cd /usr/local/pcre/ \
    && if [ -f Makefile ]; then make distclean; fi \
    && CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
    ./configure --disable-shared
/bin/sh: line 2: ./configure: No such file or directory
make[1]: *** [/usr/local/pcre//Makefile] Error 127
make[1]: Leaving directory `/root/nginx/nginx-1.0.5'
make: *** [build] Error 2


google 

make[1]: *** [/usr/local/pcre//Makefile] Error 127


分析

[root@nginx nginx-1.0.5]# ./configure --help | grep '\--with-pcre'
  --with-pcre                        force PCRE library usage
  --with-pcre=DIR                    set path to PCRE library sources
  --with-pcre-opt=OPTIONS            set additional options for PCRE building

source ????????

解决

[root@nginx nginx-1.0.5]# ./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.12/  --with-openssl=/usr/local/openssl/ --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --http-client-body-temp-path=/var/tmp/nginx/client/  --http-proxy-temp-path=/var/tmp/nginx/proxy/ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --user=nginx  --group=nginx

[root@nginx nginx-1.0.5]# make

make -f objs/Makefile

make[1]: Entering directory `/root/nginx/nginx-1.0.5'

cd ../pcre-8.12/ \

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

&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \ 

./configure --disable-shared

checking for a BSD-compatible install... /usr/bin/install -c 

checking whether build environment is sane... make[1]: *** [../pcre-8.12//Makefile]

 

ok

总结--with-pcre=DIR 是设置源码目录,而不是编译安装后的目录。



本文转自 dongnan 51CTO博客,原文链接: http://blog.51cto.com/dngood/623925

相关文章
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available
/usr/bin/cmake: /usr/local/lib/libcurl.so.4: no version information available
|
5月前
|
PHP
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
php 使用phpize报错Cannot find config.m4. Make sure that you run ‘/usr/bin/phpize‘ in the top l
230 1
|
11月前
|
C语言
gcc静态编译/usr/bin/ld: cannot find -lc
gcc静态编译/usr/bin/ld: cannot find -lc
Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)Call Stack
Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)Call Stack
481 0
configure: error: /usr/include/openssl is a bad --with-openssl prefix
configure: error: /usr/include/openssl is a bad --with-openssl prefix
477 0
/usr/include/glib-2.0/glib/gtypes.h:32:10: fatal error: glibconfig.h: No such file or directory
/usr/include/glib-2.0/glib/gtypes.h:32:10: fatal error: glibconfig.h: No such file or directory
209 0
编译OpenJDK8:configure: could not find or use freetype at location
编译OpenJDK8:configure: could not find or use freetype at location
162 0
|
C语言
编译OpenJDK8:configure error /usr/lib64/ccache/gcc is a symbolic link to ccache
编译OpenJDK8:configure error /usr/lib64/ccache/gcc is a symbolic link to ccache
125 0
|
Linux PHP
configure: error: Cannot find ldap libraries in /usr/lib
<p style="padding-top:0px; padding-bottom:0px; margin-top:0px; margin-bottom:0px; clear:both; height:auto; overflow:hidden; color:rgb(80,80,80); font-family:宋体,'Arial Narrow',arial,serif; font-siz
1804 0
Error: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8‘ not found (required by /usr/anaconda3/bin/)
Error: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8‘ not found (required by /usr/anaconda3/bin/)
593 0
Error: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8‘ not found (required by /usr/anaconda3/bin/)