乌班图安装nginx 出现 make: *** No rule to make target ‘build‘, needed by ‘default‘. Stop.

在用源码安装nginx,make时出现如下:

make: *** No rule to make target 'build', needed by 'default'.  Stop.

这个的原因是缺少依赖库,在执行./configure时你应该在最下面可以看到下面字样:

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

这里很明显的提示error,缺少 PCRE 库,提示你可以安装或 禁用这个模块。
一般安装nginx都需要三个依赖库:pcre,zlib,openssl。安装好就行了,跟nginx一样,下载这三个库的源码包下来编译安装。

乌班图的包名不太一样,使用以下命令安装,分别对应三个包,可以一起安装,其中openssl不是必须
sudo apt-get install libpcre3-dev 
sudo apt-get install zlib1g zlib1g.dev 
sudo apt-get install openssl

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 当你在Ubuntu上运行"make: *** No rule to make target `install'"错误时,这通常意味着你没有正确配置或安装所需的依赖库。根据引用\[3\]中的提示,安装Nginx通常需要三个依赖库:pcre、zlib和openssl。请确保你已经正确安装了这些库。 你可以使用以下命令在Ubuntu上安装这些依赖库: sudo apt-get install libpcre3-dev sudo apt-get install zlib1g-dev sudo apt-get install libssl-dev 安装完成后,再次运行make install命令,应该就能成功安装Nginx了。 #### 引用[.reference_title] - *1* *2* [Ubuntu下一步一步安装nginx,make: *** No rule to make target `build‘, needed by `default‘....](https://blog.csdn.net/u010499087/article/details/108248774)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [乌班图安装nginx 出现 make: *** No rule to make targetbuild‘, needed by ‘default‘. Stop.](https://blog.csdn.net/qq_44657868/article/details/128602090)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值