编译PCRE库报错

一、重新编译安装pcre出错

之前安装Nginx的时候没问题,后面重新安装就出现了问题

[root@Nginx pcre-8.41]# ./configure
checking for a BSD-compatible install... /usr/bin/install  -c
checking whether build environment is sane... configure: error: newly created file is older than distributed files!
Check your system clock

这是由于系统时间与硬件时间不一致导致的

首先查看硬件时间:

[root@Nginx ~]# hwclock 
Wed 15 Mar 2017 12:22:58 AM GMT  -0.978673 seconds

查看系统时间

[root@Nginx ~]# date
Wed Mar 15 00:23:01 GMT 2017

发现和系统时间不一致:

解决方法:同步时间,写入CMOS:

[root@Nginx ~]# ntpdate ntp.sjtu.edu.cn 202.120.2.101  (上海交通大学网络中心NTP服务器地址)
6 Aug 16:09:36 ntpdate[24318]: step time server 202.120.2.101 offset 12496929.620743 sec
[root@Nginx ~]# clock -w  

重新编译一下就没问题。

如果您觉得这篇文章对您有帮助,不妨支持我一下!
------ 本文结束 ------

版权声明

Stefanie'Notes by Stefanie is licensed under a Creative Commons BY-NC-ND 4.0 International License.
Stefanie创作并维护的Stefanie'Notes博客采用创作共用保留署名-非商业-禁止演绎4.0国际许可证
本文首发于Stefanie'Notes 博客( https://linshizhe.github.io/ ),版权所有,侵权必究。