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

将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

 

转载于:https://www.cnblogs.com/wzc0066/p/6676638.html

你可能感兴趣的:(Release file is expired, Updates for this repository will not be applied.(资源索引文件过期问题)...)