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&#39; has modification time 1.2e+07 s in the future的更多相关文章

  1. Nginx在make时报错[objs/Makefile:469: objs/src/core/ngx_murmurhash.o] Error

    Nginx在make时报错[objs/Makefile:469: objs/src/core/ngx_murmurhash.o] Error   在安装目录下执行 vim obj/Markfile 把 ...

  2. /application/nginx/sbin/nginx -h

    [root@web03 ~]# /application/nginx/sbin/nginx -h nginx version: nginx/1.6.3Usage: nginx [-?hvVtq] [- ...

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

    今天安装中文词检索功能模块 coreseek,其中一个分词模块 mmseg ,编译安装到最后,出现annot find input file: src/Makefile.in aclocal   // ...

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

    安装coreseek 出现了cannot find input file: src/Makefile.in 解决方法如下 >autoheader >automake --add-missi ...

  5. Linux+.Net Core+Nginx(在Linux上使用Nginx反向代理.Net Core 项目)

    Linux+.Net Core+Nginx 之前的文章中有提到关于使用Nginx在linux来实现反向代理,今天我们继续加点料.在Centos7中部署.NetCore,然后使用Nginx进行反向代理! ...

  6. nginx warn an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/ while reading upstream

    最近管理的nginx发现大量的error log,log内容如下: an upstream response is buffered to a temporary file /var/cache/ng ...

  7. 部署Asp.net core & Nginx,通过nginx转发

    部署Asp.net core & Nginx,通过nginx转发 CentOS 7 x64 1.vs2017 建立Asp.net core项目,并发布到目录 2.通过FTP工具,将程序copy ...

  8. 【转】WARNING! File system needs to be upgraded. You have version null and I want version 7. Run the '${HBASE_HOME}/bin/hbase migrate' script. 的解决办法

    前段时间集群出问题,hadoop和hbase启动不了了. 后来hadoop回复了,hbase死活master无法启动.打开日志发现报了以下错误: WARNING! File system needs ...

  9. make: Warning: File `Makefile' has modification time 17 s in the future

    linux下,make makefile文件的时候报警告: make: Warning: File `Makefile' has modification time 17 s in the futur ...

随机推荐

  1. HDU 1166 线段树模板&树状数组模板

    HDU1166 上好的线段树模板&&树状数组模板 自己写的第一棵线段树&第一棵树状数组 莫名的兴奋 线段树: #include <cstdio> using nam ...

  2. android平台 cocos2d-x 读取相册数据

    现已解决 方案如下: 1.使用 jni 调用 java 方法 启动相册选择框2.使用java将获取的图片保存到本地3.使用Cocos2d-x中 CCImage 读取 JAVA代码如下: //启动图片选 ...

  3. .Net Core(二) 下

    接上面 http://www.cnblogs.com/xcodevs/p/5584218.html 在解决方案浏览器中,右击 Controllers 目录.选择添加>新建项.选择Web API控 ...

  4. CruiseControl.NET 的安装与配置

    CC.NET 是 CruiseControl.NET 的简称,官方网站在这里. 官方的定义是自动连续集成服务, 使用Microsoft .NET Framework实现. 另外它还有Java的版本叫做 ...

  5. nodejs脚手架express-generator

    1.安装生成器 npm install express-generator -g 2. 创建名称为APP的应用: express my-project 3.安装依赖包 cd my-project np ...

  6. dubbo之异步调用

    异步调用 基于 NIO 的非阻塞实现并行调用,客户端不需要启动多线程即可完成并行调用多个远程服务,相对多线程开销较小. 在 consumer.xml 中配置: <dubbo:reference ...

  7. 08--MOOC--C/C++ 根据年月日计算星期几

    计算任何一天是星期几的几种算法 一:常用公式 W = [Y-1] + [(Y-1)/4] - [(Y-1)/100] + [(Y-1)/400] + D Y是年份数,D是这一天在这一年中的累积天数,也 ...

  8. iproute2和tc的高级路由用法

    #Linux advanced router ip link show #显示链路 ip addr show #显示地址(或ifconfig) ip route show #显示路由(route -n ...

  9. 02-Linux命令基础-第02天(压缩包管理、服务器搭建与使用、vim)

    01-   复习 /boot 目录 引导项 八种文件类型: 文件:- 目录:d 软链接:l 字符设备文件:c 块设备文件:b 管道:p 套接字:s 未知 cp –a 保持源文件属性(如时间属性 如果不 ...

  10. 进程映射、mmap(day05)

    一.内存管理(续) 每个进程都有自己独立的4G的虚拟地址空间. 冯.诺伊曼体系结构 哈佛体系结构 section 代码段 只读数据段 栈段 举例说明 数据所属的段. 代码参见 memory.c 如何获 ...