18.10 以 root 身份运行 apt-get -f install 时出现“软件包 sgml-base 尚未配置。”

18.10 以 root 身份运行 apt-get -f install 时出现“软件包 sgml-base 尚未配置。”

由于 sgml-base 依赖错误,从 18.04 升级到 18.10 失败,但可以继续

我尝试使用 Synaptic 重新安装sgml-base1.29,结果又出现了E: Internal Error, No file name for sgml-base:amd64

成功运行:

sudo apt update && sudo apt dist-upgrade

root@Bionic-Beaver:~# 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.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up sgml-base (1.29) ...
cannot rename /var/lib/sgml-base/supercatalog to /var/lib/sgml-base/supercatalog.old: Operation not permitted at /usr/sbin/update-catalog line 322.
dpkg: error processing package sgml-base (--configure):
 installed sgml-base package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of metacity-common:
 metacity-common depends on sgml-base (>= 1.28); however:
  Package sgml-base is not configured yet.

dpkg: error processing package metacity-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sgml-data:
 sgml-data depends on sgml-base (>= 1.28); however:
  Package sgml-base is not configured yet.

dpkg: error processing package sgml-data (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    Errors were encountered while processing:
 sgml-base
 metacity-common
 sgml-data
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

尝试删除有问题的文件

sudo rm -rf /var/lib/sgml-base/supercatalog

然后重新安装三个包:

sudo apt-get install sgml-data metacity-common sgml-base --reinstall

相关内容