Warning: File `src/core/nginx.h' has modification time 1.2e+07 s in the future

Nginx安装时Warning: File `src/core/nginx.h‘ has modification time 1.2e+07 s in the future问题的解决方法

问题场景:

解压文件:tar -zxvf nginx-1.7.4.tar.gz

nginx-1.7.4/
nginx-1.7.4/auto/
nginx-1.7.4/conf/
tar: nginx-1.7.4/auto: time stamp 2014-08-05 19:13:10 is 12165186.025866769 s in the future
nginx-1.7.4/contrib/
tar: nginx-1.7.4/conf: time stamp 2014-08-05 19:13:06 is 12165182.024958914 s in the future
nginx-1.7.4/src/
tar: nginx-1.7.4/contrib: time stamp 2014-08-05 19:13:06 is 12165182.020185855 s in the future
nginx-1.7.4/configure
tar: nginx-1.7.4/src: time stamp 2014-08-05 19:13:10 is 12165186.019670919 s in the future
tar: nginx-1.7.4/configure: time stamp 2014-08-05 19:13:05 is 12165181.018314486 s in the future
nginx-1.7.4/LICENSE
tar: nginx-1.7.4/LICENSE: time stamp 2014-08-05 19:13:06 is 12165182.018083727 s in the future
nginx-1.7.4/README
tar: nginx-1.7.4/README: time stamp 2014-08-05 19:13:06 is 12165182.017770715 s in the future
nginx-1.7.4/html/
nginx-1.7.4/man/
tar: nginx-1.7.4/html: time stamp 2014-08-05 19:13:10 is 12165186.017546593 s in the future
nginx-1.7.4/CHANGES.ru
tar: nginx-1.7.4/man: time stamp 2014-08-05 19:13:10 is 12165186.017422397 s in the future
tar: nginx-1.7.4/CHANGES.ru: time stamp 2014-08-05 19:13:14 is 12165190.01206064 s in the future
nginx-1.7.4/CHANGES
tar: nginx-1.7.4/CHANGES: time stamp 2014-08-05 19:13:17 is 12165193.007600125 s in the future
nginx-1.7.4/man/nginx.8
tar: nginx-1.7.4/man/nginx.8: time stamp 2014-08-05 19:13:06 is 12165182.007250707 s in the future
nginx-1.7.4/html/50x.html
tar: nginx-1.7.4/html/50x.html: time stamp 2014-08-05 19:13:06 is 12165182.007094338 s in the future
nginx-1.7.4/html/index.html
tar: nginx-1.7.4/html/index.html: time stamp 2014-08-05 19:13:06 is 12165182.006936145 s in the future

这里已经显示问题,但我没有在意。

配置:./configure

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

依赖PCRE(PCRE(Perl Compatible Regular Expressions)是一个Perl库,包括 perl 兼容的正则表达式库。这些在执行正规表达式模式匹配时用与Perl 5同样的语法和语义是很有用的。Boost太庞大了,使用boost regex后,程序的编译速度明显变慢。测试了一下,同样一个程序,使用boost::regex编译时需要3秒,而使用pcre不到1秒。因此改用pcre来解决C语言中使用正则表达式的问题)库,下载地址:www.pcre.org/
指定库的位置:./configure --with-pare=/opt/pcre

Configuration summary
  + using PCRE library: /opt/pcre
  + 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"

编译:make

make -f objs/Makefile
make[1]: Entering directory `/opt/nginx-1.7.4‘
make[1]: Warning: File `src/core/nginx.h‘ has modification time 1.2e+07 s in the future
cd /opt/pcre 	&& if [ -f Makefile ]; then make distclean; fi 	&& CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " 	./configure --disable-shared
/bin/sh: line 2: ./configure: No such file or directory
make[1]: *** [/opt/pcre/Makefile] Error 127
make[1]: Leaving directory `/opt/nginx-1.7.4‘
make: *** [build] Error 2

查看系统时区:date -R

中国应该是+0800才对,可是显示的却是-0800

修改时区:

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  
时区的信息存在/usr/share/zoneinfo/下面,本机的时区信息存在/etc/localtime

查看系统日期:date

发现日期也不对,

修改日期:date -s 20141118

修改时间:date -s 19:16:55

把之前的文件删除:rm -rf nginx-1.7.4

再次解压:tar -zxvf nginx-1.7.4.tar.gz

nginx-1.7.4/
nginx-1.7.4/auto/
nginx-1.7.4/conf/
nginx-1.7.4/contrib/
nginx-1.7.4/src/
nginx-1.7.4/configure
nginx-1.7.4/LICENSE
nginx-1.7.4/README
nginx-1.7.4/html/
nginx-1.7.4/man/
nginx-1.7.4/CHANGES.ru
nginx-1.7.4/CHANGES
nginx-1.7.4/man/nginx.8
nginx-1.7.4/html/50x.html
nginx-1.7.4/html/index.html
nginx-1.7.4/src/core/
nginx-1.7.4/src/event/
nginx-1.7.4/src/http/
nginx-1.7.4/src/mail/
nginx-1.7.4/src/misc/
nginx-1.7.4/src/os/
nginx-1.7.4/src/os/unix/

这时显示结果就没问题了。

但这只是解决了警告的问题,但错误并没有解决。

Warning: File `src/core/nginx.h' has modification time 1.2e+07 s in the future

时间: 2024-11-06 07:20:43

Warning: File `src/core/nginx.h' has modification time 1.2e+07 s in the future的相关文章

src/core/ngx_regex.h:15:18: fatal error: pcre.h: No such file or directory

make nginx报错 解决方案:apt-get install libpcre3-dev

make: Warning: File `Makefile&#39; has modification time 1.8e+06 s in the future

通过这个错误提示信息我们可以知道,Makefile的修改时间点是Linux当前的一个未来时间点.可以通过修改Linux的当前时间来解决这个问题: $sudo date -s 'hh:mm:ss yyyy-mm-dd' 比如我想讲我的Linux系统的时间修改为2017-09-18 18:45:00 可以通过如下指令修改: $sudo date -s '18:45:00 2017-09-18' make: Warning: File `Makefile' has modification time

make: Warning: File `led.c&#39; has modification time 15 s in the future

S5PV210裸机程序 执行make出现错误 错误原因:宿主机和虚拟机时间不同步导致 解决方法:在虚拟机中---->虚拟机---->设置--->选项---->vmware tools---->将客户机与虚拟机同步--->确定 make: Warning: File `led.c' has modification time 15 s in the future

make: Warning: File `Makefile&#39; has modification time 17 s in the future

linux下,make makefile文件的时候报警告: make: Warning: File `Makefile' has modification time 17 s in the future make: warning: Clock skew detected. Your build may be incomplete. 原因是:系统时间不正确,文档被修改的时间比系统时间大,把系统时间修改正确即可. 解决方法: 修改时间的命令: date -s 07/13/2007 date -s

/application/nginx/sbin/nginx -h

[[email protected] ~]# /application/nginx/sbin/nginx -h nginx version: nginx/1.6.3Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives] Options: -?,-h : this help -v : show version and exit -V : show version and configure optio

vue2.5版本源代码编译报 Could not load ..\vue\src\core/config 错误的问题

前置说明: 日期:2018年6月5日 环境:win7系统.vscode.vue2.5.0源代码 1)问题现象: D:\workspace\html5\everyday2\vue>npm run dev > [email protected] dev D:\workspace\html5\everyday2\vue> rollup -w -c build/config.js --environment TARGET:web-full-dev rollup v0.50.0bundles D:

编译安装mmseg提示cannot find input file: src/Makefile.in错误

今天安装中文词检索功能模块 coreseek,其中一个分词模块 mmseg ,编译安装到最后,出现annot find input file: src/Makefile.in aclocal   //是一个perl 脚本程序,它的定义是:"aclocal - create aclocal.m4 by scanning configure.ac"libtoolize --force  //运行后有一个错误,不用管它.automake --add-missingautoconfautohe

how to solve &quot;[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!&quot;

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! Saw this warning message when using failsafe maven plugin, found the fix after a little search. add following to pom.xml <properties> <pro

安装coreseek cannot find input file: src/Makefile.in 错误解决方法

安装coreseek 出现了cannot find input file: src/Makefile.in 解决方法如下 >autoheader >automake --add-missing --copy >autoconf 然后再执行./configure --prefix=/usr/local/mmseg 即可解决.