首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >从源代码安装后,Nginx无法找到libpcre.so.0

从源代码安装后,Nginx无法找到libpcre.so.0
EN

Stack Overflow用户
提问于 2014-10-08 15:35:51
回答 1查看 1.6K关注 0票数 0

我在ubuntu14.04上从源代码构建nginx,但是在构建完nginx之后,当我运行nginx时,会得到以下错误:

代码语言:javascript
复制
/etc/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.0: 
     cannot open shared object file: No such file or directory

原因可能是因为它被称为libpcre.so3。有我可以为libpcre0安装的软件包吗?

我可以将nginx配置为使用libpcre.so.3吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-03-29 22:10:55

下面是如何使用OpenSSL和Pcre-8.36编译Nginx,并使用自定义用户名和组获取其他特权:

代码语言:javascript
复制
./configure --with-cc-opt="-I $STATICLIBSSL/include -I/usr/include" \
--with-ld-opt="-L $STATICLIBSSL/lib -Wl,-rpath -lssl -lcrypto -ldl -lz" \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-pcre=/lib/libpcre.so.1
--with-http_ssl_module \
--with-http_spdy_module \
--with-file-aio \
--with-ipv6 \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--without-mail_pop3_module \
--without-mail_smtp_module \
--without-mail_imap_module \
--user=nginx \
--group=nginx \
--with-http_spdy_module \
--with-http_auth_request_module \
--with-openssl=/root/openssl/openssl-1.0.2a/libssl.a
--with-zlib=/usr/lib/x86_64-linux-gnu/libz.a
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26260868

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档