nginx编译出现如下错误。

nginx版本:nginx-1.12.2
编译参数: ./configure --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module --without-http
结果如下:
Configuration summary

  • PCRE library is not used
  • using system OpenSSL library
  • zlib library is not used

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/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"
找不到
Configuration summary

  • PCRE library is not used
  • using system OpenSSL library
  • zlib library is not used
    那我执行: pacman -S pcre-devel zlib-devel openssl-devel
    结果如下
    error: target not found: pcre-devel
    error: target not found: zlib-devel
    error: target not found: openssl-devel

请不要在 Arch 上照搬 CentOS 的教程……
如果需要编译定制版的 nginx,请参考 Arch 官方的 PKGBUILD。使用 yaourt -G nginx 可获取。

  你好,感谢你回答我的问题,我是新手初次接触ArchLinux这个发行版本。

你说的这个yaourt 是怎么使用的 ,我在上面执行报错找不到那个命令
-bash: yaourt: command not found

没有是因为你没有装呗。你直接去这里 https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/nginx 下好了。

话说回来,你为什么要自己编译 nginx 啊?

有些功能想编译进去。tcp代理转发