最小centos6安装nginx问题

发布于 2021-11-07 03:44:44 字数 4482 浏览 744 评论 7

centos6是最小安装的,看提示是缺少 PCRE,

但是 rpm -qa pcre显示有安装
pcre-7.8-3.1.el6.x86_64
这个问题谁能帮忙看下,先谢谢了!

 

[root@localhost nginx-1.0.11]# ./configure --prefix=/opt/nginx

checking for OS
 + Linux 2.6.32-71.el6.x86_64 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_ACCEPTFILTER ... not found
checking for TCP_DEFER_ACCEPT ... found
checking for accept4() ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system endianess ... little endianess
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

泪冰清 2021-11-08 21:03:26

推荐自己下载pcre,并自己编译安装,然后再装nginx

小情绪 2021-11-08 21:03:17

./configure --prefix=/usr/local/nginx --with-openssl=/usr/include (启用ssl)

安装完成!谢谢大家!

噩梦成真你也成魔 2021-11-08 21:02:35

安装好pcre-devel,zlib-devel,openssl-devel后其他都好了,下面2个包也都装了

openssl-1.0.0-4.el6.x86_64,openssl-devel-1.0.0-4.el6.x86_64

但是还报OpenSSL library is not used

Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + md5: using system crypto library
  + sha1: using system crypto library
  + using system zlib library

checking for OS

 + Linux 2.6.32-71.el6.x86_64 x86_64

checking for C compiler ... found

 + using GNU C compiler

 + gcc version: 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)

checking for gcc -pipe switch ... found

checking for gcc builtin atomic operations ... found

checking for C99 variadic macros ... found

checking for gcc variadic macros ... found

checking for unistd.h ... found

checking for inttypes.h ... found

checking for limits.h ... found

checking for sys/filio.h ... not found

checking for sys/param.h ... found

checking for sys/mount.h ... found

checking for sys/statvfs.h ... found

checking for crypt.h ... found

checking for Linux specific features

checking for epoll ... found

checking for sendfile() ... found

checking for sendfile64() ... found

checking for sys/prctl.h ... found

checking for prctl(PR_SET_DUMPABLE) ... found

checking for sched_setaffinity() ... found

checking for crypt_r() ... found

checking for sys/vfs.h ... found

checking for nobody group ... found

checking for poll() ... found

checking for /dev/poll ... not found

checking for kqueue ... not found

checking for crypt() ... not found

checking for crypt() in libcrypt ... found

checking for F_READAHEAD ... not found

checking for posix_fadvise() ... found

checking for O_DIRECT ... found

checking for F_NOCACHE ... not found

checking for directio() ... not found

checking for statfs() ... found

checking for statvfs() ... found

checking for dlopen() ... not found

checking for dlopen() in libdl ... found

checking for sched_yield() ... found

checking for SO_SETFIB ... not found

checking for SO_ACCEPTFILTER ... not found

checking for TCP_DEFER_ACCEPT ... found

checking for accept4() ... found

checking for int size ... 4 bytes

checking for long size ... 8 bytes

checking for long long size ... 8 bytes

checking for void * size ... 8 bytes

checking for uint64_t ... found

checking for sig_atomic_t ... found

checking for sig_atomic_t size ... 4 bytes

checking for socklen_t ... found

checking for in_addr_t ... found

checking for in_port_t ... found

checking for rlim_t ... found

checking for uintptr_t ... uintptr_t found

checking for system endianess ... little endianess

checking for size_t size ... 8 bytes

checking for off_t size ... 8 bytes

checking for time_t size ... 8 bytes

checking for setproctitle() ... not found

checking for pread() ... found

checking for pwrite() ... found

checking for sys_nerr ... found

checking for localtime_r() ... found

checking for posix_memalign() ... found

checking for memalign() ... found

checking for mmap(MAP_ANON|MAP_SHARED) ... found

checking for mmap("/dev/zero", MAP_SHARED) ... found

checking for System V shared memory ... found

checking for POSIX semaphores ... not found

checking for POSIX semaphores in libpthread ... found

checking for struct msghdr.msg_control ... found

checking for ioctl(FIONBIO) ... found

checking for struct tm.tm_gmtoff ... found

checking for struct dirent.d_namlen ... not found

checking for struct dirent.d_type ... found

checking for PCRE library ... found

checking for system md library ... not found

checking for system md5 library ... not found

checking for OpenSSL md5 crypto library ... found

checking for sha1 in system md library ... not found

checking for OpenSSL sha1 crypto library ... found

checking for zlib library ... found

creating objs/Makefile

Configuration summary

  + using system PCRE library

  + OpenSSL library is not used

  + md5: using system crypto library

  + sha1: using system crypto library

  + using system zlib library

  nginx path prefix: "/opt/nginx"

  nginx binary file: "/opt/nginx/sbin/nginx"

  nginx configuration prefix: "/opt/nginx/conf"

  nginx configuration file: "/opt/nginx/conf/nginx.conf"

  nginx pid file: "/opt/nginx/logs/nginx.pid"

  nginx error log file: "/opt/nginx/logs/error.log"

  nginx http access log file: "/opt/nginx/logs/access.log"

  nginx http client request body temporary files: "client_body_temp"

  nginx http proxy temporary files: "proxy_temp"

  nginx http fastcgi temporary files: "fastcgi_temp"

  nginx http uwsgi temporary files: "uwsgi_temp"

  nginx http scgi temporary files: "scgi_temp"

把昨日还给我 2021-11-08 20:57:29

我在nginx中安装了最新的pcre使用命名捕获还是报错,请问这个问题咋解决啊 先谢过

多情癖 2021-11-08 20:54:27

你最好直接装 rpm 包,装了就肯定不会报 pcre 的错

平定天下 2021-11-08 20:51:13

单独装一下
pcre 组件就可以了

緦唸λ蓇 2021-11-08 20:04:50

pcre-devel包装上就好

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文