【问题标题】:nginx ./configure error ubuntu 12.04nginx ./配置错误 ubuntu 12.04
【发布时间】:2012-12-12 07:33:00
【问题描述】:

在执行命令./configure时下载并尝试配置nginx 嗯遇到这个错误

./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.

然后我执行

apt-get build-dep nginx 

命令 um 得到以下错误

The following packages have unmet dependencies:
libgd2-noxpm-dev : Depends: libgd2-noxpm (= 2.0.36~rc1~dfsg-6ubuntu2) but it is not    going to be installed
E: Build-dependencies for nginx could not be satisfied.

我对 libgd2-noxpm 没有任何想法。这是我第一次使用 nginx 。如何克服这个错误。提前谢谢你

【问题讨论】:

  • 也许只安装libpcre3-dev 包再试一次?
  • 谢谢你似乎工作。文档没有说明第三方依赖项

标签: nginx


【解决方案1】:

你必须安装pcre3:

apt-get install libpcre3 libpcre3-dev

location 指令中的正则表达式支持和 ngx_http_rewrite_module 模块需要该库。 http://nginx.org/en/docs/install.html

【讨论】:

  • 这需要我也安装 libgd2-noxpm-dev
【解决方案2】:

apt-get build-dep nginx

刚刚解决了我的问题....

【讨论】:

    【解决方案3】:

    以下是在 Ubuntu 18.04 上安装 Nginx 需要遵循的步骤:

    1:安装构建必备 sudo apt-get install build-essential

    您可能会收到“udo apt-get install libpcre3 libpcre3-dev”

    2: sudo apt-get install libpcre3 libpcre3-dev

    3: sudo apt-get install zlib1g zlib1g-dev

    4: sudo apt-get install -y libssl-dev

    【讨论】:

      猜你喜欢
      • 2013-01-28
      • 1970-01-01
      • 1970-01-01
      • 2015-01-09
      • 1970-01-01
      • 2013-09-14
      • 2013-01-17
      • 2013-06-26
      • 2015-06-01
      相关资源
      最近更新 更多