/bin/sh: line 0: cd: /usr/local/src/pcre-8.35: No such file or directoryMakefile:8: recipe for targe

源码make编译nginx时报错:如下

/bin/sh: line 0: cd: /usr/local/src/pcre-8.35: No such file or directory
objs/Makefile:1133: recipe for target '/usr/local/src/pcre-8.35/Makefile' failed
make[1]: *** [/usr/local/src/pcre-8.35/Makefile] Error 1
make[1]: Leaving directory '/root/Downloads/nginx-1.6.2'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2

错误原因:

./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.35

这里最后一个参数是pcre的地址,由错误 cd: /usr/local/src/pcre-8.35: No such file or directory可以看出来,这是没有找到pcre-8.35的路径,看了以下help文件:

发现--with-pcre = DIR  set path to pcre library sources这个路径是要指向pcre的源码路径,发现这一点之后,修改路径即可。

./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/root/Download/pcre-8.35

注意上述/root/Download/pcre1.6.0是我pcre解压后的路径,即为pcre的源码

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值