systemd无法删除?


#1

输入zypper dup,输出:

Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See ‘man zypper’ for more information about this command.
Loading repository data…
Reading installed packages…
Computing distribution upgrade…

The following package is going to be REMOVED:
systemd

1 package to remove.
After the operation, 20.6 MiB will be freed.
Continue? [y/n/…? shows all options] (y): y
(1/1) Removing systemd-228-47.1.x86_64 …[error]
Removal of (45829)systemd-228-47.1.x86_64(@System) failed:
Error: Subprocess failed. Error: RPM failed: error: rpmdb: damaged header #3825 retrieved – skipping.
error: rpmdb: damaged header #3825 retrieved – skipping.
error: package systemd-228-47.1.x86_64 is not installed

Abort, retry, ignore? [a/r/i] (a):


openSUSE-Gossip-20180403-20180625
#2

@ecoart 正常的升级是不会让你卸载 systemd 的,zypper lr 看一下你的源,是不是开启了很多个源的同时在做 distupgrade?另外你那个提示的意思是 rpmdb 数据库损坏了。


#3

systemd是系统核心组件,不能删除(除非你敢 :rofl:


#4
Repository priorities are without effect. All enabled repositories share the same priority.

#  | Alias                     | Name                                    | Enabled | GPG Check | Refresh
---+---------------------------+-----------------------------------------+---------+-----------+--------
 1 | M17N                      | M17N                                    | Yes     | (r ) Yes  | Yes    
 2 | Mozilla                   | Mozilla                                 | Yes     | (r ) Yes  | Yes    
 3 | code                      | Visual Studio Code                      | Yes     | (r ) Yes  | Yes    
 4 | download.nvidia.com-leap  | nVidia Graphics Drivers                 | Yes     | (r ) Yes  | Yes    
 5 | google-chrome             | google-chrome                           | Yes     | (r ) Yes  | Yes    
 6 | openSUSE_ZH               | openSUSE_ZH                             | Yes     | (r ) Yes  | Yes    
 7 | packman.inode.at-suse     | Packman Repository                      | Yes     | (r ) Yes  | Yes    
 8 | repo-debug                | openSUSE-Leap-15.0-Debug                | No      | ----      | ----   
 9 | repo-debug-non-oss        | openSUSE-Leap-15.0-Debug-Non-Oss        | No      | ----      | ----   
10 | repo-debug-update         | openSUSE-Leap-15.0-Update-Debug         | No      | ----      | ----   
11 | repo-debug-update-non-oss | openSUSE-Leap-15.0-Update-Debug-Non-Oss | No      | ----      | ----   
12 | repo-non-oss              | openSUSE-Leap-15.0-Non-Oss              | Yes     | (r ) Yes  | Yes    
13 | repo-oss                  | openSUSE-Leap-15.0-Oss                  | Yes     | (r ) Yes  | Yes    
14 | repo-source               | openSUSE-Leap-15.0-Source               | No      | ----      | ----   
15 | repo-source-non-oss       | openSUSE-Leap-15.0-Source-Non-Oss       | No      | ----      | ----   
16 | repo-update               | openSUSE-Leap-15.0-Update               | Yes     | (r ) Yes  | Yes                                                                                                                                                                           
17 | repo-update-non-oss       | openSUSE-Leap-15.0-Update-Non-Oss       | Yes     | (r ) Yes  | Yes                                                                                                                                                                           
18 | skype-stable              | skype (stable)                          | Yes     | (r ) Yes  | Yes

#5

root权限下通过两个命令已经修复:
rm -f /var/lib/rpm/__db*
rpm --rebuilddb

参考:

  1. https://superuser.com/questions/1001975/error-rpmdb-damaged-header-1439-retrieved-skipping
  2. https://blog.fpmurphy.com/2015/11/repair-damaged-rpm-database.html