没有 APT 命令对我有用。
根据这个网站上的一些帖子,解决方案是更换我的服务器。所以我尝试在设置/软件中更改它并选择最佳服务器。
但是,下载缓存和其他内容后,我收到此错误消息
Failed to download repository information. Check your Internet connection.
但我的连接没有问题。细节我有:
W:Target Packages (Packages) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2,
W:Target Translations (en) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2,
W:GPG error: htps://repo.skype.com /deb stable InRelease:
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3,
W:The repository 'htps://repo.skype.com/deb stable InRelease' is not signed.
W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
W:See apt-secure(8) manpage for repository creation and user configuration details.
W:An error occurred during the signature verification. The repository is not updated and the previous index files will be used.
GPG error: htp://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04 Release:
The following signatures were invalid: KEYEXPIRED 1496576244,
W:The repository 'htp://ppa.launchpad.net/cdekter/ppa/ubuntu xenial Release' does not have a Release file.
W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
W:See apt-secure(8) manpage for repository creation and user configuration details.
W:Failed to fetch htp://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/Release.gpg The following signatures were invalid: KEYEXPIRED 1496576244,
E:Failed to fetch http://ubnt-archive.xfree.com.ar/ubuntu/dists/xenial-updates/universe/i18n/Translation-en.xz Hash Sum mismatch,
E:Failed to fetch http://ppa.launchpad.net/cdekter/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
W:Some index files failed to download. They have been ignored, or old ones used instead.
答案1
您的存储库似乎相当混乱。难怪 APT 无法正常工作。我不确定您对所有非标准存储库和 PPA 的跟踪有多好,但您缺少大多数证书,因此系统无法工作。
我想您已经意识到该命令正在为工作apt update
奠定基础。正在将您的系统状态与存储库的系统状态进行比较,并在下载任何安装文件之前更新您的本地存储库信息。apt upgrade
apt install
apt update
这与配置文件一起工作
etc/apt/...
主要文件是
etc/apt/sources.list
您有一个可选目录
etc/apt/sources.list.d/..
看起来真是太混乱了。
我的建议是备份该目录,然后删除/etc/apt/sources.list.d
文件夹的内容并替换原始内容sources.list
(您肯定备份了?如果没有,请参见如何恢复默认存储库?/etc/apt/sources.list
或者从 Ubuntu 安装盘获取并将其复制到您已安装的系统上)。然后重试。
修复存储库后,该过程
sudo apt update
sudo apt upgrade
sudo apt install <whatever you want>
应该可以再次工作。
如果是这样,我建议将您的替代存储库包含到sources.list
文件中,然后逐步使用 apt upgrade 检查是否有任何缺失。您可能仍拥有的 PPA 密钥可以复制到目录中/etc/apt/trusted.gpg.d
。