armdian系统GPT错误及修改系统时间的方法

发布于 2021-10-22  69 次阅读


重新安装了armdian系统,更新软件源得时候GPT报错,更新GPT的时候又发现系统时间不对,GPT安装不上。记录一下是怎么解决的。
kv2i1fx1.png

{mtitle title="GPT报错"/}

更新GPT

apt-key adv --keyserver keyserver.ubuntu.com --recv 密钥

密钥在报错的信息里边,如图上就是 0E98404D386FA1D9648ACFD622F3D1380E98404D386FA1D9 这几个密钥报错,执行 apt-key adv --keyserver keyserver.ubuntu.com --recv 648ACFD622F3D138 命令即可解决,一个密钥一条命令。

修改系统时间

执行命令

tzselect

在出现的结果中,用数字选择大洲、国家、地区

root@Chainedbox:~# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa                                                            7) Europe
2) Americas                                                          8) Indian Ocean
3) Antarctica                                                        9) Pacific Ocean
4) Asia                                                             10) coord - I want to use geographical coordinates.
5) Atlantic Ocean                                                   11) TZ - I want to specify the timezone using the Posix TZ format.
6) Australia
#?
root@Chainedbox:~# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa                                                            7) Europe
2) Americas                                                          8) Indian Ocean
3) Antarctica                                                        9) Pacific Ocean
4) Asia                                                             10) coord - I want to use geographical coordinates.
5) Atlantic Ocean                                                   11) TZ - I want to specify the timezone using the Posix TZ format.
6) Australia
#? 4
Please select a country whose clocks agree with yours.
1) Afghanistan            10) Cyprus                19) Japan                 28) Macau                 37) Qatar                 46) Turkmenistan
2) Armenia                11) East Timor            20) Jordan                29) Malaysia              38) Russia                47) United Arab Emirates
3) Azerbaijan             12) Georgia               21) Kazakhstan            30) Mongolia              39) Saudi Arabia          48) Uzbekistan
4) Bahrain                13) Hong Kong             22) Korea (North)         31) Myanmar (Burma)       40) Singapore             49) Vietnam
5) Bangladesh             14) India                 23) Korea (South)         32) Nepal                 41) Sri Lanka             50) Yemen
6) Bhutan                 15) Indonesia             24) Kuwait                33) Oman                  42) Syria
7) Brunei                 16) Iran                  25) Kyrgyzstan            34) Pakistan              43) Taiwan
8) Cambodia               17) Iraq                  26) Laos                  35) Palestine             44) Tajikistan
9) China                  18) Israel                27) Lebanon               36) Philippines           45) Thailand
#? 9
Please select one of the following timezones.
1) Beijing Time
2) Xinjiang Time
#? 1

The following information has been given:

        China
        Beijing Time

Therefore TZ='Asia/Shanghai' will be used.
Selected time is now:   Sun Oct 24 11:11:56 CST 2021.
Universal Time is now:  Sun Oct 24 03:11:56 UTC 2021.
Is the above information OK?
1) Yes
2) No
#? 1

You can make this change permanent for yourself by appending the line
        TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Shanghai
root@Chainedbox:~#

将修改结果存入本地文件中

cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime

更新系统时间

ntpd time.windows.com

验证是否修改成功

date -R

可以看到修改完成,此时将系统重启,以免计划任务执行异常

root@Chainedbox:~# date -R
Sun, 24 Oct 2021 11:18:15 +0800

间接性发奋图强,持续性混吃等死