nginx ./configure error ubuntu 12.04

co2*_*f2e 47 nginx

下载并尝试在执行命令时尝试配置nginx ./configure um得到此错误

./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.
Run Code Online (Sandbox Code Playgroud)

我执行了

apt-get build-dep nginx 
Run Code Online (Sandbox Code Playgroud)

命令你得到以下错误

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.
Run Code Online (Sandbox Code Playgroud)

我对libgd2-noxpm一无所知.这是我第一次使用nginx.如何克服这个错误.先感谢您

mat*_*ege 102

你必须安装pcre3:

apt-get install libpcre3 libpcre3-dev

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


小智 13

apt-get build-dep nginx

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


小智 5

以下是在 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