Centos6.6 安装 nginx 报sys/filio.h ... not found、O_PATH ... not found

最近在学习nginx的使用,在安装了centos6.6的电脑上使用源码安装ngnix,在控制台出现了一堆not found,但是控制台没有报错error,在--prefix = /usr/local/nginx  参数指定的路径下没有找到对应生成的文件,一开始以为编译失败到处找资源包,所有资源包都安装后还是有错,找了一圈也没有答案。花了好半天时间也没解决。

仔细查看了控制台的输出发现有在objs目录下输出内容,cd 到该目录下查看一下,发现该目录下生成了可执行文件,也有一些其他资源文件。抱着试试看的心态执行了一下该文件,报错--prefix = /usr/local/nginx参数指定目录下两个文件未找到,()实际上这个目录都没有生成)。(忘记截图了-_-||)

Centos6.6 安装 nginx 报sys/filio.h ... not found、O_PATH ... not found_第1张图片

 

[root@localhost app]# ./configure
checking for OS
 + Linux 2.6.32-504.el6.x86_64 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.4.7 20120313 (Red Hat 4.4.7-23) (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 O_PATH ... not found
...
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for F_READAHEAD ... not found
checking for F_NOCACHE ... not found
checking for directio() ... not found
......
checking for dlopen() ... not found
checking for SO_SETFIB ... not found
checking for SO_ACCEPTFILTER ... not found

....
checking for TCP_FASTOPEN ... not found
......
checking for struct dirent.d_namlen ... not found
......
checking for PCRE JIT support ... not found
checking for md5 in system md library ... not found
checking for md5 in system md5 library ... not found
checking for md5 in system OpenSSL crypto library ... found
checking for sha1 in system md library ... not found
checking for sha1 in system OpenSSL 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: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  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"
 

解决办法:

      将编译后目录下的conf文件下的内容全部拷贝到 /usr/local/nginx /conf 下,再启动上述的nginx可执行文件就能启动成功了Centos6.6 安装 nginx 报sys/filio.h ... not found、O_PATH ... not found_第2张图片

你可能感兴趣的:(Nginx)