由于在公司里需要使用代理上网,搞了好久,好不容易把 apt 整得可以访问外网了,结果在执行 spt update 时总是提示

Release file for http://… is not valid yet (invalid for another xxd xxh xxmin xxs)

多亏有搜索引擎,在网上找到一个类似的问题,原来是系统时间不对导致的,当前时间应该是2018年9月26日,我的Ubuntu时间还是2018年2月2日。

所以,更改一下系统时间就可以啦!

以下是 apt update 提示的具体错误信息:

dnt@dnt-OptiPlex-7010:~$ sudo apt update

Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease

Get:1 http://cn.archive.ubuntu.com/ubuntu">http://cn.archive.ubuntu.com/ubuntu">http://cn.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]

Get:3 http://cn.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]

Get:4 http://cn.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]

Reading package lists... Done

E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 172d 12h 57min 7s). Updates for this repository will not be applied.

E: Release file for http://cn.archive.ubuntu.com/ubuntu/dists/bionic/InReleaseis not valid yet (invalid for another 83d 11h 45min 49s). Updates for this repository will not be applied.

E: Release file for http://cn.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 235d 13h 24min 55s). Updates for this repository will not be applied.

E: Release file for http://cn.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 235d 11h 49min 56s). Updates for this repository will not be applied.

以下是更改 Ubuntu 系统时间的具体过程:

dnt@dnt-OptiPlex-7010:~$ date

2018年 02月 02日 星期五 19:53:38 CST

dnt@dnt-OptiPlex-7010:~$ timedatectl

Local time: 五 2018-02-02 19:54:45 CST

Universal time: 五 2018-02-02 11:54:45 UTC

RTC time: 五 2018-02-02 11:54:45

Time zone: Asia/Shanghai (CST, +0800)

System clock synchronized: no

systemd-timesyncd.service active: yes

RTC in local TZ: no

dnt@dnt-OptiPlex-7010:~$ date -R

Fri, 02 Feb 2018 19:56:01 +0800

dnt@dnt-OptiPlex-7010:~$ sudo date -s 09/26/18

2018年 09月 26日 星期三 00:00:00 CST

dnt@dnt-OptiPlex-7010:~$ sudo date -s 11:15:45

2018年 09月 26日 星期三 11:15:45 CST

dnt@dnt-OptiPlex-7010:~$ sudo hwclock --systohc

[sudo] password for dnt: 

dnt@dnt-OptiPlex-7010:~$ date

2018年 09月 26日 星期三 11:16:00 CST

apt update 提示 Release file for http://… is not valid yet (invalid for another d..)的更多相关文章

  1. Release file is expired, Updates for this repository will not be applied.(资源索引文件过期问题)

    将Debian下载源同步到本地之后,通过本地资源地址进行apt update操作时提示过期问题: E: Release file for http://localhost/security/dists ...

  2. Ubuntu sudo apt-get update提示 Failed to fetch,解决办法

    问题: 执行sudo apt-get update提示:Failed to fetch chen@ubuntu:~/soft/Python-$ sudo apt-get update Get: htt ...

  3. 【亲测有效】Ubuntu18.04 sudo apt update无法解析域名的解决方案

    问题描述如下: 拿起了封尘已久的ThinkPad,输入 sudo apt update 的时候,发现这个命令变得不好使了,具体出现的问题如下图所示: #( 09/08/19@ 2:44下午 )( py ...

  4. ubuntu apt update failed to fetch

    When I do command sudo apt update, always get belowing errors: Err:1 http://archive.ubuntu.com/ubunt ...

  5. ubuntu 18.04在更新软件库时出现E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet...

    1.完整的错误信息如下: E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease i ...

  6. 【linux开发】ubuntu执行sudo apt-get update提示缺少公钥

    ubuntu执行sudo apt-get update提示缺少公钥 提示信息如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 获取:1 http://arch ...

  7. Ubuntu 16.04出现:Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi'

    错误: Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if ...

  8. 无后缀名伪静态路径在IIS7.0的网站提示 "404 - File or directory not found"

    新配置服务器(windows server 2008,not sp1) 经测试情况如下: ①无后缀名伪静态路径行在IIS7.0的网站提示 ”404 - File or directory not fo ...

  9. Python 运行 Python hello.py 出错,提示: File "<stdin>" , line 1

    写了一个hello.py,仅有一句,print 'hello world', 运行 Python hello.py 出错,提示: File "<stdin>" , li ...

随机推荐

  1. VIOS挂载ISO文件

    6.VIOS挂载ISO文件 1.给vhost建立虚拟设备 mkvdev -vadapter vhostX -fbo -dev cdx 2.建立存放ISO的资料库 mkrep -sp rootvg -s ...

  2. STM32 HAL库学习系列---定时器TIM 输入捕获功能

    基本方法 1.设置TIM2 CH1为输入捕获功能: 2.设置上升沿捕获: 3.使能TIM2 CH1捕获功能: 4.捕获到上升沿后,存入capture_buf[0],改为捕获下降沿: 5.捕获到下降沿后 ...

  3. 【JAVA习题一】古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一 对兔子,假如兔子都不死,问每个月的兔子总数为多少?

    斐波那契函数:f(n)=f(n-1)+f(n-2); package XXXXX; import java.util.Scanner; public class Fbonaci斐波那契 { publi ...

  4. 同一父进程下的子进程之间的通信(pipe通信)

    首先对于fork命令  通过fork命令创建进程 父进程返回子进程id 子进程返回0 失败返回-1 对于pipe通讯机制   pipe通讯是半双工的 也就是说只能一方读一方写 题目中想要P1的输出作为 ...

  5. Java基本语法---标识符、变量、数据类型转换及进制

    Java基本语法 标识符 标识符:凡事可以自己起名字的地方,都可以叫做标志符 标识符命名规则: 26个字母大小写,数字0-9,下划线_,美元符号$ 数字不能开头 不能使用关键字和保留字,但是可以包含 ...

  6. MVC案例之模糊查询与删除

    查询操作: Servlet         //1. 调用 CustomerDAO 的 getAll() 得到 Customer 的集合 List<Customer> customers ...

  7. 七个生产案例告诉你BATJ为何选择ElasticSearch!应用场景和优势!

    本文来源于公众号[胖滚猪学编程],转载请注明出处. 从今天开始,想和你一起死磕ElasticSearch,学习分布式搜索引擎,跟着胖滚猪就对了! 既然是ES的第一课,那么最重要的是让你爱上它!不想说那 ...

  8. 公司如何通过电脑监控来规范员工行为-iis7服务器管理功能教程

    现在员工办公基本都用电脑,而电脑不仅仅可以用来处理工作,还可以上网.娱乐等.往往很多员工的自制能力比较差,在工作时间和人聊天,浏览购物网站,看新闻,炒股等休闲娱乐上花费大量的时间,导致工作效率降低,影 ...

  9. Rocket - devices - CLINT

    https://mp.weixin.qq.com/s/4LfZZDKCTQhiKIUjvbDKEg 简单介绍CLINT的实现. 1. 概述 CLINT即是Core Local Interrupter的 ...

  10. call 和 apply 的区别?哪个性能更好?

    1.call 和 apply 都是 function 类 原型上的方法:每一个函数作为 function 的实例都能调用这两个方法:这两个方法执行的目的都是用来改变函数中 this 指向的,让函数执行 ...