Mdadm 阻止 apt-get 升级

Mdadm 阻止 apt-get 升级

所以

Mdadm 在尝试升级软件包时似乎会导致错误。 apt-get upgrade结果为:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mdadm (3.3-2ubuntu7.2) ...
dpkg: error processing package mdadm (--configure):
 subprocess installed post-installation script returned error exit status 128
Errors were encountered while processing:
 mdadm
E: Sub-process /usr/bin/dpkg returned an error code (1)

同样的错误限制了我安装例如 meldsudo apt-get install meld

还导致

Processing triggers for libc-bin (2.23-0ubuntu7) ...
Errors were encountered while processing:
 mdadm
E: Sub-process /usr/bin/dpkg returned an error code (1)

我努力了包装已损坏,但无法清除或重新安装!但没有成功。

apt-get -f install给出:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mdadm (3.3-2ubuntu7.2) ...
dpkg: error processing package mdadm (--configure):
subprocess installed post-installation script returned error exit status 128
Errors were encountered while processing:
  mdadm
E: Sub-process /usr/bin/dpkg returned an error code (1)

有什么想法吗?我使用的是 Ubuntu Server 16.04.2 LTS

答案1

好的,通过删除mdadm包解决了:

sudo apt-get install -f mdadm-

为了保险起见,我运行了包升级:

sudo apt-get update && sudo apt-get upgrade

答案2

如果您有软件 RAID,则需要 mdadm。

dpkg --unpack /var/cache/apt/archives/mdadm_3.3.2-5+deb8u2_amd64.deb
dpkg --configure mdadm

这个解决方法对我有用。(以 Debian 为例)

答案3

上述方法对我来说并不适用......apt-ge tinstall -f mdadm- 会删除我需要的东西

我是这样解决的:

dpkg --force-all --remove mdadm
dpkg --force-all --purge mdadm
apt-get install -y mdadm

这避免了删除依赖于 mdadm 的依赖项

相关内容