我对 Ubuntu 还比较陌生,在全新 Ubuntu 18.04 下安装 Dropbox 时遇到了麻烦。
我遇到了与上一个简短问题中描述的相同的问题 我无法安装 Dropbox 客户端:无法打开 libatomic.so.1 即 dropbox 需要库 libatomic1。
不幸的是,命令:
sudo apt install libatomic1
只会导致以下错误:
$sudo apt install libatomic1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libatomic1 : Depends: gcc-8-base (= 8-20180414-1ubuntu2) but 8.3.0-6ubuntu1~18.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
按照命令的建议,我运行了:
sudo apt update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:3 http://ppa.launchpad.net/texworks/ppa/ubuntu bionic InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Reading package lists... Done
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 6h 42min 11s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 6h 43min 16s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 6h 41min 22s). Updates for this repository will not be applied.
我该如何解决这个问题?提前感谢您的帮助。
答案1
首先要检查的是您是否已经更新了可用软件的软件列表?(即sudo apt update
)因为您的错误消息给出了过时的软件包(因此错误是有效的;即。https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=gcc-8-base)
OP 在以下情况下回应了错误:apt update
错误消息突出显示了无效时间,即。
尚未生效(有效期为 6 小时 42 分 11 秒)
您的系统时间设置不正确;目前大约有 6.5 小时的误差 - 因此系统拒绝这些包裹,因为存在问题...请检查您的时间(和时区)
https://help.ubuntu.com/community/UbuntuTime 或者 如何更改 Ubuntu 上的日期和时间?