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

來源:互聯網
上載者:User

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

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 futurenginx-1.7.4/contrib/tar: nginx-1.7.4/conf: time stamp 2014-08-05 19:13:06 is 12165182.024958914 s in the futurenginx-1.7.4/src/tar: nginx-1.7.4/contrib: time stamp 2014-08-05 19:13:06 is 12165182.020185855 s in the futurenginx-1.7.4/configuretar: nginx-1.7.4/src: time stamp 2014-08-05 19:13:10 is 12165186.019670919 s in the futuretar: nginx-1.7.4/configure: time stamp 2014-08-05 19:13:05 is 12165181.018314486 s in the futurenginx-1.7.4/LICENSEtar: nginx-1.7.4/LICENSE: time stamp 2014-08-05 19:13:06 is 12165182.018083727 s in the futurenginx-1.7.4/READMEtar: nginx-1.7.4/README: time stamp 2014-08-05 19:13:06 is 12165182.017770715 s in the futurenginx-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 futurenginx-1.7.4/CHANGES.rutar: nginx-1.7.4/man: time stamp 2014-08-05 19:13:10 is 12165186.017422397 s in the futuretar: nginx-1.7.4/CHANGES.ru: time stamp 2014-08-05 19:13:14 is 12165190.01206064 s in the futurenginx-1.7.4/CHANGEStar: nginx-1.7.4/CHANGES: time stamp 2014-08-05 19:13:17 is 12165193.007600125 s in the futurenginx-1.7.4/man/nginx.8tar: nginx-1.7.4/man/nginx.8: time stamp 2014-08-05 19:13:06 is 12165182.007250707 s in the futurenginx-1.7.4/html/50x.htmltar: nginx-1.7.4/html/50x.html: time stamp 2014-08-05 19:13:06 is 12165182.007094338 s in the futurenginx-1.7.4/html/index.htmltar: 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_moduleoption, or install the PCRE library into the system, or build the PCRE librarystatically from the source with nginx by using --with-pcre=<path> option.
依賴PCRE(PCRE(Perl Compatible Regular Expressions)是一個Perl庫,包括 perl 相容的Regex庫。這些在執行正規運算式模式比對時用與Perl 5同樣的文法和語義是很有用的。Boost太龐大了,使用boost regex後,程式的編譯速度明顯變慢。測試了一下,同樣一個程式,使用boost::regex編譯時間需要3秒,而使用pcre不到1秒。因此改用pcre來解決C語言中使用Regex的問題)庫,: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/Makefilemake[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 futurecd /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 directorymake[1]: *** [/opt/pcre/Makefile] Error 127make[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/configurenginx-1.7.4/LICENSEnginx-1.7.4/READMEnginx-1.7.4/html/nginx-1.7.4/man/nginx-1.7.4/CHANGES.runginx-1.7.4/CHANGESnginx-1.7.4/man/nginx.8nginx-1.7.4/html/50x.htmlnginx-1.7.4/html/index.htmlnginx-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/
這時顯示結果就沒問題了。

但這隻是解決了警告的問題,但錯誤並沒有解決。






聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.