从 Debian 稳定版升级到测试版时程序包损坏

从 Debian 稳定版升级到测试版时程序包损坏

在了解到 Debian 测试版比 Debian 稳定版更受桌面用户欢迎后,我决定从稳定版升级到测试版。我使用命令“sed -i 's/jessie/stable/g'/etc/apt/sources.list”将“jessie”的所有实例替换为“testing”。然后,我使用命令“sudo apt-”进行了升级get update && sudo apt-get update”。现在,当我尝试安装软件包或升级时,我得到以下输出:

# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 console-setup : Depends: keyboard-configuration (= 1.123) but 1.156 is installed
 console-setup-linux : Depends: keyboard-configuration (= 1.123) but 1.156 is installed
 libpurple-bin : Depends: libpurple0 but it is not installed
 systemd : Depends: libsystemd0 (= 215-17+deb8u5) but 232-8 is installed
 udev : Depends: libudev1 (= 215-17+deb8u5) but 232-8 is installed
E: Unmet dependencies. Try using -f.

很自然地,我按照说明尝试使用 -f:

# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 console-setup : Depends: keyboard-configuration (= 1.123) but 1.156 is installed
 console-setup-linux : Depends: keyboard-configuration (= 1.123) but 1.156 is installed
 libpurple-bin : Depends: libpurple0 but it is not installed
 systemd : Depends: libsystemd0 (= 215-17+deb8u5) but 232-8 is installed
 udev : Depends: libudev1 (= 215-17+deb8u5) but 232-8 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

当我尝试安装单个软件包时,我遇到了类似的错误。这是我的sources.list 的样子:

# 

# deb cdrom:[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160609-14:12]/ testing contrib main non-free

# deb cdrom:[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160609-14:12]/ testing contrib main non-free

deb http://debian.gtisc.gatech.edu/debian/ testing main 
deb-src http://debian.gtisc.gatech.edu/debian/ testing main 

deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free

# testing-updates, previously known as 'volatile'
deb http://debian.gtisc.gatech.edu/debian/ testing-updates main contrib non-free
deb-src http://debian.gtisc.gatech.edu/debian/ testing-updates main contrib non-free

那么,关于如何解决这个问题有什么建议吗?

答案1

Debian 测试版比 Debian 稳定版更受桌面用户欢迎

我强烈不同意这种说法。

Debian 测试和不稳定是开发分支并且不适合正常使用,这些版本应该用于寻找错误,因此不能期望在一致的基础上完全发挥作用。

测试和不稳定是不是只是“Debian 通过更新的软件包保持稳定”,该范例完全不同,几乎与稳定版本所使用的范例完全相反。

如果需要更新的软件包版本,我建议使用 jessie-backports 存储库来代替 [1] 或等到今年晚些时候发布 Debian 9.0。

[1]https://backports.debian.org/

答案2

apt 并不是为了降级发行版而设计的。但也许你可以通过 apt-pinning 来做到这一点。

生成文件

/etc/apt/preferences.d/jessie-preferences

    Package: *
Pin: release o=Debian                                                  

Pin-Priority: 1001

最后一个命令是模拟。

apt update && apt --dry-run dist-upgrade当没有包冲突时,您可以不使用 --dry-run 来执行此操作。它可以工作,但也可以不工作。先备份一下。

太快。之后删除该文件。

相关内容