BlogArticles/2024-07/sysv-rc-conf 升级失败 依赖冲突 Atom...

50 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
{
title: "sysv-rc-conf 升级失败 依赖冲突 AtomPi 正点原子RK3568 Debian升级小记",
description: "文章记录了Debian 11升级12的过程重点警告使用systemd时切勿升级或应卸载sysv-rc-conf否则会引发冲突甚至删除systemd。升级前务必用timeshift备份并注意处理dbgsym包及依赖问题。",
draft: false,
type: "article",
created_at: "2024-07-12T21:15:00+08:00",
published_at: "2024-07-12T21:28:00+08:00",
updated_at: [ "2024-07-12T21:28:00+08:00"],
category: '个人',
tags: [ "Linux" ],
tech_stack: [ "Linux" ],
tech_stack_percent: [ 1 ],
tech_stack_icon_names: [ "simple-icons:linux" ],
tech_stack_theme_colors: [ "#263238" ],
}
---
!!!warning Legacy Article 过时的文章
此文章从旧博客迁移而来,编写时技术水平有限,仅供参考
!!!
故事略长,但是先讲重点
如果你使用systemd作为init程序那么不要升级sysv-rc-conf甚至可以直接卸载
正文AtomPi 正点原子RK3568 Debian升级小记
新拿到手的RK3568自带的是Debian11 说实话,能用,如果不像我一样对新系统偏执完全不用升级
升级系统步骤如下:
设置timeshift系统备份很重要不要莽去搜简单易用有效
删除所有dbgsym
`dpkg -l | grep dbgsym | awk '{print $2}' | xargs sudo dpkg --purge `
这个命令说实话有点危险它本意是删除所有带dbgsym的软件包后续升级时这些软件包会造成依赖问题
修改`/etc/apt/sources.list` 我这里是Debian11升12所以把bullseye改为bookworm
`sudo apt update $$ sudo apt upgrade`
升级后你会发现一些软件包没有被升级,我的处理方式挺麻烦的,当然你选择不升级也不会有任何影响。
我这边大概有80多个未升级的软件包很多软件包能看出来是一类的当你使用
'''
sudo apt upgrade
sudo apt dist-upgrade
'''
都不能升级,但`sudo apt upgrade [特定软件包名]`又可以升级时可以试试这样例如gstreamer
`dpkg -l | grep gstreamer | awk '{print $2}' | xargs sudo apt dist-upgrade -y --allow-change-held-packages `
好,其实以上这些都不是我想讲的
我想说的是其中一个软件包sysv-rc-conf
在尝试单独升级这个包时会出现systemd相关的依赖冲突问题。但是奇怪的是其他软件包的依赖问题都是这样子的
升级A时
A依赖B B版本不对
B依赖A A的新版本不能被B接受
但是sysv-rc-conf却没有出现在依赖问题中。
然后我试着删掉包重装。然后发现重装时要求删掉我的systemd
这下我知道为什么我第一次升级把systemd升没了。上一次我的处理方法是记录所有包删掉所有包重装所有包。
sysv init和systemd init是冲突的。用systemd就好了。