Qt has modification time xxx s in the future

3 篇文章 0 订阅

现象:编译Qt程序时,提示warning: File ‘/opt/Qt5.12.8/5.12.8/gcc_64/mkspecs/linux-g++/qmake.conf’ has modification time 716043631 s in the future

ubuntu@ubuntu-dev-machine:~/test/qt_test$ ls -alh /opt/
total 20K
drwxr-xr-x  5 root   root   4.0K 627  2045 .
drwxr-xr-x 25 root   root   4.0K 105 22:32 ..
drwxr-xr-x  9 root   root   4.0K 624  2045 Qt5.12.8

发现设备上的Qt目录的时间戳都是2045年,由于安装Qt时,系统没有安装ntp,导致系统没有同步时间,因此安装后的Qt文件都是2045年。

修改如下:
(1)在unbuntu上安装ntp,获取正确的时间

sudo apt install ntp
sudo systemctl enable ntp
sudo systemctl restart ntp

(2)批量更新目录的时间戳

find /opt -type f -exec touch {} +
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值