我不能使用这一行:
sudo apt-get update
甚至
sudo apt-get -o Acquire::Check-Valid-Until=false update
我收到这个错误
Err:1 http://your.repo.domain/repository bionic InRelease
Could not resolve 'your.repo.domain'
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease
Hit:3 http://packages.ros.org/ros/ubuntu bionic InRelease
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:7 http://dl.google.com/linux/chrome/deb stable Release [943 B]
Get:8 http://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]
Hit:9 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:10 http://archive.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:11 http://archive.ubuntu.com/ubuntu xenial-proposed InRelease
Hit:12 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Reading package lists... Done
E: Release file for http://dl.google.com/linux/chrome/deb/dists/stable/Release is not valid yet (invalid for another 1h 1min 1s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease is not valid yet (invalid for another 4min 20s). Updates for this repository will not be applied.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
我在网上搜索了两个小时,尝试了所有方法,但都没有成功,我甚至确定了约会时间
date
祝我玩得愉快。我有 Ubuntu 18.04 和 Windows 10 双启动。
答案1
以下是一个解决方法:
回显“Acquire::Check-Valid-Until“false”;\nAcquire::Check-Date“false”;” | cat > /etc/apt/apt.conf.d/10no--check-valid-until
一条线就能保证工作