将Debian下载源同步到本地之后,通过本地资源地址进行apt update操作时提示过期问题:

E: Release file for http://localhost/security/dists/stable/updates/InRelease is expired (invalid since 1d 1h 53min 38s). Updates for this repository will not be applied.

对于该问题有三种解决方法:

1)通过cron实现定期同步。

2)零时解决方法:

aptitude -o Acquire::Check-Valid-Until=false update
apt-get -o Acquire::Check-Valid-Until=false update

3)创建文件:/etc/apt/apt.conf.d/10no--check-valid-until,添加内容:

Acquire::Check-Valid-Until "0";

然后就不再提示过期警告了。

参考:

【1】https://www.bufeihua.cn/p/562249fca47d0b0001b5cc10

【2】http://unix.stackexchange.com/questions/2544/how-to-work-around-release-file-expired-problem-on-a-local-mirror

Release file is expired, Updates for this repository will not be applied.(资源索引文件过期问题)的更多相关文章

  1. 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 ...

  2. apt update 提示 Release file for http://… is not valid yet (invalid for another d..)

    由于在公司里需要使用代理上网,搞了好久,好不容易把 apt 整得可以访问外网了,结果在执行 spt update 时总是提示 Release file for http://- is not vali ...

  3. 萌新笔记——git的问题(error: object file .git/objects/* is empty...)的解决方案及对git版本库文件的了解

    由于操作不当,导致git版本库出了大问题,如下所示: error: object file .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e ...

  4. git的问题(error: object file .git/objects/* is empty...)的解决方案及对git版本库文件的了解

    由于操作不当,导致git版本库出了大问题,如下所示: error: object file .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e ...

  5. file标签 - 图片上传前预览 - FileReader & 网络图片转base64和文件流

    记得以前做网站时,曾经需要实现一个图片上传到服务器前,先预览的功能.当时用html的<input type="file"/>标签一直实现不了,最后舍弃了这个标签,使用了 ...

  6. File操作-将数据库里的数据写入到指定路径的txt文件里

    package com.Cristin.File;//将数据库里的数据写入到指定路径的txt文件里 import java.io.File;import java.io.FileOutputStrea ...

  7. 使用File类、StreamRead和StreamWrite读写数据、以及Path类操作文件路径和Directory

    1.File类的概念: File类,是一个静态类,主要是来提供一些函数库用的.静态实用类,提供了很多静态的方法,支持对文件的基本操作,包括创建,拷贝,移动,删除和 打开一个文件. File类方法的参量 ...

  8. Debian本地镜像长时间不更新

    一.执行apt-get update 使用一个长期未更新的本地源,得到错误的提示: Release file for ... is expired. Updates for this reposito ...

  9. Ubuntu 解决:当执行`sudo apt-get update`命令时 出现的 “apt-get 404 Not Found Package Repository Errors” 问题

    Ubuntu 解决:当执行sudo apt-get update或者sudo apt-get install命令是出现的 "apt-get 404 Not Found Package Rep ...

随机推荐

  1. Chapter3 复杂度分析(上):如何分析,统计算法的执行效率和资源消耗

    数据结构解决的问题:“快” + “省”,即为时间,空间复杂度分析 1:为什么需要复杂度分析? 因为通过统计手段分析的结果受到两个因素的影响,一:测试结果非常依赖测试环境,二:测试结果受数据规模的影响很 ...

  2. Redis管理:安全/耗时命令日志与命令监控/数据库管理工具

    1.安全管理 1)绑定指定IP Redis的安全设计是在“Redis运行在可信环境”这个前提之下的,在生产环境中建议通过应用程序连接Redis.Redis可以配置只接受来自指定IP的的请求,可通过修改 ...

  3. mysql 多个字段合并

    group_concat 函数默认“,”合并 select p.id as patent_id,p.application_no,p.name,p.inventer,group_concat(pi.` ...

  4. 在线安装TIDB集群

     在线安装TiDB集群 服务器准备 说明:TiDB8需要能够连接外网,以便下载各类安装包 TiDB4非必须,但最好是有一台,因为后续测试Mysql数据同步或者进行性能比较时,都要用到 TiKV最好是采 ...

  5. gentoo 工具命令

    查看具体某个命令来源于哪个软件包,使用 equery,比如说查找 lsusb 来源于哪个包,可以用 equery belongs lsusb

  6. Python实践练习:强口令检测

    题目: 写一个函数,它使用正则表达式,确保传入的口令字符串是强口令.强口令的定义是:长度不少于 8 个字符,同时包含大写和小写字符,至少有一位数字.你可能需要用多个正则表达式来测试该字符串,以保证它的 ...

  7. leetcode448

    public class Solution { public IList<int> FindDisappearedNumbers(int[] nums) { Dictionary<i ...

  8. python_10 迭代器和生成器

    迭代器协议: 1.迭代器协议是指:对象必须提供一个next方法,执行该方法要么返回迭代中的下一项,要么就引起一个Stopiteration异常,以终止迭代(只能往后走不能往前退) 2.可迭代对象:实现 ...

  9. Python : *args和**kwargs是什么东东呢?

    def foo(*args, **kwargs): print 'args = ', args print 'kwargs = ', kwargs print '------------------- ...

  10. Java并发辅助类的使用

    目录 1.概述 2.CountdownLatch 2-1.构造方法 2-2.重要方法 2-3.使用示例 3.CyclicBarrier 3-1.构造方法 3-2.使用示例 4.Semaphore 4- ...