用make编译nginx的时候提示如下错误:
/bin/sh: line 0: cd: /usr/local/pcre-8.35: No such file or directory
objs/Makefile:1133: recipe for target ‘/usr/local/pcre-8.35/Makefile’ failed
make[1]: *** [/usr/local/pcre-8.35/Makefile] Error 1
make[1]: Leaving directory ‘/root/Downloads/nginx-1.6.2’
Makefile:8: recipe for target ‘build’ failed
- 使用执行查看相关参数如何填写:
./configure --help | grep pcre - 其中:
--wite-pcre = DIR set path to pcre library sources(设置pcre库的源路径),这是因为我们刚装的pcre库未帮它设置我们当前的文件路径. - 你需要看下
pcre-8.35的目录, - 然后执行:
./configure --prefix=/home/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/home/pcre-8.35/home/nginx不是你解压包后的目录,是你新增的目录,用来安装nginx/home/pcre-8.35是你的pcre目录
- 成功后就可以执行nginx安装指令
本文解决在使用make编译Nginx时遇到的pcre库路径错误问题,提供正确的配置参数及目录设定方法,确保Nginx编译顺利进行。
2326

被折叠的 条评论
为什么被折叠?



