「APT」- 常见错误汇总

Settings schema ‘…’ is not installed

# dconf-editor 
(dconf-editor:54647): GLib-GIO-ERROR **: 10:28:21.500: Settings schema 'ca.desrt.dconf-editor.Lib' is not installed
Trace/breakpoint trap (core dumped)

# vinagre 
(vinagre:54958): GLib-GIO-ERROR **: 10:29:43.428: Settings schema 'org.gnome.Vinagre' is not installed
Trace/breakpoint trap (core dumped)

原因分析:
我们配置 apt-mark hold <pkg-name> 以防止意外升级,而该配置导致该问题。

解决方案:
apt-mark unhold <pkg-name>

APT had planned for dpkg to do more than it reported back

# apt install vino
...
Processing triggers for libc-bin (2.31-0ubuntu9.5) ...
W: APT had planned for dpkg to do more than it reported back (7 vs 9).
   Affected packages: vino:amd64

原因分析:
我们配置 apt-mark hold <pkg-name> 以防止意外升级,而该配置导致该问题。

解决方案:
apt-mark unhold <pkg-name>

This must be accepted explicitly before updates for this repository can be applied

问题描述

# apt-get update
...
Reading package lists... Done
N: Repository 'http://mirrors.tencentyun.com/debian buster InRelease' changed its 'Version' value from '10.9' to '10.11'
E: Repository 'http://mirrors.tencentyun.com/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://mirrors.tencentyun.com/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://mirrors.tencentyun.com/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://mirrors.tencentyun.com/debian stretch-updates InRelease' changed its 'Suite' value from 'oldstable-updates' to 'oldoldstable-updates'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://mirrors.tencentyun.com/debian-security stretch/updates InRelease' changed its 'Suite' value from 'oldstable' to 'oldoldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://mirrors.tencentyun.com/debian stretch Release' changed its 'Suite' value from 'oldstable' to 'oldoldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

原因分析

参考 –allow-releaseinfo-change 选项,文档进行相关的解释。

解决方案

apt-get update --allow-releaseinfo-change

W: The repository … does not have a Release file.

apt – What can I do if a repository/PPA does not have a Release file? – Ask Ubuntu

在添加仓库后,执行 apt-get update 产生如下错误:

W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.

原因分析

该源不支持当前的 Linux 发行版,因此我们无法使用该仓库(除非强行操作)。

解决方案

我们放弃使用官方未受到官方支持的仓库,否则可能会破坏 APT 依赖关系,出现难以解决的问题。

… server certificate verification failed. CAfile …

kali linux – Is it possible to have APT accept an “invalid” certificate? – Unix & Linux Stack Exchange
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none – Stack Overflow

问题描述

...
W: The repository 'https://downloads.opennebula.io/repo/6.0/Ubuntu/18.04 stable Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://downloads.opennebula.io/repo/6.0/Ubuntu/18.04/dists/stable/opennebula/binary-arm64/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
...

原因分析

系统版本较旧,没有最新的 CA 证书。

解决方案

正确的解决方法是导入 CA 证书

但是我们采用关闭 CA 检查的方式来解决问题:

// Do not verify peer certificate
Acquire::https::Verify-Peer "false";
// Do not verify that certificate name matches server name
Acquire::https::Verify-Host "false";