root@kali:~# apt update
Get:1 http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease [30.5 kB]
Reading package lists... Done
W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument
W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument
E: Release file for http://http.kali.org/kali/dists/kali-rolling/InRelease is not valid yet (invalid for another 101d 9h 32min 36s). Updates for this repository will not be applied.
可以看到提示信息中显示时间差异invalid for another 101d 9h 32min 36s,仔细检查系统时间可以看到,当前系统时钟还停留在2017年,而准确的当前时间是2018年:
Trying to open: /dev/rtc0
Trying to open: /dev/rtc
Trying to open: /dev/misc/rtc
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
检查timedatectl显示输出
# timedatectl status
Local time: Thu 2017-12-21 14:54:17 UTC
Universal time: Thu 2017-12-21 14:54:17 UTC
RTC time: n/a
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: no
# timedatectl status
Local time: Mon 2018-04-02 11:56:49 CST
Universal time: Mon 2018-04-02 03:56:49 UTC
RTC time: n/a
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: no
检查和设置时钟同步
检查timesyncd服务
# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendo
Active: failed (Result: exit-code) since Fri 2017-12-15 06:10:29 CST; 3 month
Docs: man:systemd-timesyncd.service(8)
Main PID: 302 (code=exited, status=1/FAILURE)
Status: "Shutting down..."
Dec 15 06:10:29 kali systemd[1]: systemd-timesyncd.service: Service has no hold-
Dec 15 06:10:29 kali systemd[1]: systemd-timesyncd.service: Scheduled restart jo
Dec 15 06:10:29 kali systemd[1]: Stopped Network Time Synchronization.
Dec 15 06:10:29 kali systemd[1]: systemd-timesyncd.service: Start request repeat
Dec 15 06:10:29 kali systemd[1]: systemd-timesyncd.service: Failed with result '
Dec 15 06:10:29 kali systemd[1]: Failed to start Network Time Synchronization.