虚拟机时间滞后造成的编译警告解决


虚拟机时间滞后造成的编译警告解决
 
编译项目 prj 时得到警告:
make: warning:  Clock skew detected.  Your build may be incomplete.
 
 
环境说明:
prj 是windows共享给虚拟机(ubuntu)的项目目录。虚拟机时间比主机时间滞后。
[pz@ubuntu: prj]$ pwd
/mnt/hgfs/Share2Vm/prj
 
 
无效的尝试 touch:
find . -type f | xargs touch
touch后再使用 ls -l 查看文件时间,新时间戳和主机一样(比虚拟机早)。
 
 
解决:
将虚拟机时间与主机同步。
[pz@ubuntu:prj]$ date
Thu Oct 10 15:42:56 CST 2013
[pz@ubuntu:prj]$ cd /usr/sbin/
[pz@ubuntu:sbin]$ vmware-toolbox-cmd timesync status
Disabled
[pz@ubuntu:sbin]$ vmware-toolbox-cmd timesync enable
Enabled
[pz@ubuntu:sbin]$ date
Thu Oct 10 16:04:02 CST 2013
[pz@ubuntu:sbin]$ 
 
 
问题再现:
将虚拟机时间设置到“以前”
[pz@ubuntu:prj]$ date
Thu Oct 10 18:40:14 CST 2013
[pz@ubuntu:prj]$ sudo date -s 18:30:00
[sudo] password for pz: 
Thu Oct 10 18:30:00 CST 2013
[pz@ubuntu:prj]$ date
Thu Oct 10 18:30:01 CST 2013
然后执行make就会报错。
 

相关内容

    暂无相关文章