长话短说

长话短说

长话短说

  • $ sudo apt upgrade建议我使用$ sudo apt --fix-broken install.
  • $ sudo apt --fix-broken install因为失败而被打破/var/cache/apt/archives/uim-data_1%3a1.8.8-6_all.deb (--unpack)
  • .deb包因/usr/share/uim/lib/sigscheme-init.scm不存在而失败。
  • 我无法修复/usr/share/uim/lib/sigscheme-init.scm$ sudo apt upgrade因为$ sudo apt upgrade它坏了。

完整问题

我在Debian上。我的 Wi-Fi 就在一个大的中间断了$ sudo apt update; sudo apt upgrade。我不知道这是否导致了我的问题,但从那以后我就无法这样做了$ sudo apt upgrade

当我尝试时,$ sudo apt upgrade出现以下错误:

me@debian:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libuim-plugins : Depends: uim-common (>= 1:1.8.6+gh20161003.0.d63dadd-2) but it is not installed
 uim : Depends: uim-common (= 1:1.8.6+gh20161003.0.d63dadd-2) but it is not installed
 uim-anthy : Depends: uim-common (>= 1:1.8.6+gh20161003.0.d63dadd-2) but it is not installed
 uim-fep : Depends: uim-common (>= 1:1.8.6+gh20161003.0.d63dadd-2) but it is not installed
 uim-gtk2.0 : Depends: uim (= 1:1.8.8-6)
              Depends: uim-gtk2.0-immodule (= 1:1.8.8-6) but it is not installed
              Depends: uim-data (>= 1:1.8.8-6) but it is not installed
 uim-gtk3 : Depends: uim-common (>= 1:1.8.6+gh20161003.0.d63dadd-2) but it is not installed
 uim-qt : Depends: uim-common (>= 1:1.8.6+gh20161003.0.d63dadd-2) but it is not installed
 uim-qt5 : Depends: uim (= 1:1.8.8-6)
           Depends: uim-qt5-immodule (= 1:1.8.8-6) but it is not installed
           Depends: uim-data (>= 1:1.8.8-6) but it is not installed
 uim-utils : Depends: uim-common (>= 1:1.8.6+gh20161003.0.d63dadd-2) but it is not installed
 uim-xim : Depends: uim (>= 1:1.8.8-6)
           Depends: uim-data (>= 1:1.8.8-6) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ sudo apt autoremove命令给出了类似的错误,并且还建议我运行$ apt --fix-broken install

所以,我当然会跑步$ sudo apt --fix-broken install

me@debian:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libqt4-designer libqt4-network libqt4-qt3support libqt4-script libqt4-sql libqt4-sql-mysql
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  uim uim-anthy uim-data uim-fep uim-gtk2.0-immodule uim-gtk3 uim-gtk3-immodule uim-plugins uim-qt5-immodule
The following packages will be REMOVED:
  libuim-plugins uim-qt uim-utils
The following NEW packages will be installed:
  uim-data uim-gtk2.0-immodule uim-gtk3-immodule uim-plugins uim-qt5-immodule
The following packages will be upgraded:
  uim uim-anthy uim-fep uim-gtk3
4 upgraded, 5 newly installed, 3 to remove and 147 not upgraded.
7 not fully installed or removed.
Need to get 0 B/1,411 kB of archives.
After this operation, 4,686 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
dpkg: considering deconfiguration of uim-anthy, which would be broken by installation of uim-data ...
dpkg: yes, will deconfigure uim-anthy (broken by uim-data)
(Reading database ... 338130 files and directories currently installed.)
Preparing to unpack .../uim-data_1%3a1.8.8-6_all.deb ...
De-configuring uim-anthy (1:1.8.6+gh20161003.0.d63dadd-2) ...
Error: in load: file "/usr/share/uim/lib/sigscheme-init.scm" not found
dpkg: error processing archive /var/cache/apt/archives/uim-data_1%3a1.8.8-6_all.deb (--unpack):
 installed uim-anthy package pre-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/uim-data_1%3a1.8.8-6_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

正如您所看到的,apt抱怨该文件/usr/share/uim/lib/sigscheme-init.scm不存在。这是真实的。该目录/usr/share/uim/确实存在,但lib/其中不包含任何目录。

我不知道如何纠正这个问题,因为我通常会用$ sudo apt upgrade.但运行$ sudo apt upgrade因错误而终止。

我尝试在其他地方寻找解决方案但是答案不起作用并且表明我可能处于“循环依赖地狱“。 这红迪帖子建议我运行$ sudo apt dist-upgrade,但dist-upgrade也被这个问题破坏了。

我尝试卸载我的uim库,sudo apt remove <uim-package-name>但这并没有解决未满足的依赖项错误。

我可能应该sigscheme-init.scm在互联网上的某个地方找到一个文件,创建一个/usr/share/uim/lib/目录并将该.scm文件复制到那里(以及它附带的任何其他文件)。但这看起来很难、很老套、很恶心,我担心它可能会破坏一些东西。

有没有更好的方法来解决这个问题?也许与aptdpkg?或者也许只是以某种方式重新安装所有与我uim相关的库?

我尝试过的其他东西

  • $ sudo apt upgrade -f失败。
  • $ sudo apt reinstall <uim-something>导致同样的错误。

这是我跑步时发生的情况dpkg --configure -a

me@debian:~/writing/personal$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of uim-xim:
 uim-xim depends on uim (>= 1:1.8.8-6); however:
  Version of uim on system is 1:1.8.6+gh20161003.0.d63dadd-2.
 uim-xim depends on uim-data (>= 1:1.8.8-6); however:
  Package uim-data is not installed.

dpkg: error processing package uim-xim (--configure):
 dependency problems - leaving unconfigured
Setting up libuim-data (1:1.8.8-6) ...
Error: in load: file "/usr/share/uim/lib/sigscheme-init.scm" not found
dpkg: error processing package libuim-data (--configure):
 installed libuim-data package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of uim-qt5:
 uim-qt5 depends on uim (= 1:1.8.8-6); however:
  Version of uim on system is 1:1.8.6+gh20161003.0.d63dadd-2.
 uim-qt5 depends on uim-qt5-immodule (= 1:1.8.8-6); however:
  Package uim-qt5-immodule is not installed.
 uim-qt5 depends on uim-data (>= 1:1.8.8-6); however:
  Package uim-data is not installed.

dpkg: error processing package uim-qt5 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of uim-gtk2.0:
 uim-gtk2.0 depends on uim (= 1:1.8.8-6); however:
  Version of uim on system is 1:1.8.6+gh20161003.0.d63dadd-2.
 uim-gtk2.0 depends on uim-gtk2.0-immodule (= 1:1.8.8-6); however:
  Package uim-gtk2.0-immodule is not installed.
 uim-gtk2.0 depends on uim-data (>= 1:1.8.8-6); however:
  Package uim-data is not installed.

dpkg: error processing package uim-gtk2.0 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 uim-xim
 libuim-data
 uim-qt5
 uim-gtk2.0

编辑:更新:我最终擦除了系统,所以我无法再测试什么有效/无效。

答案1

我编辑/var/lib/dpkg/status并删除了所有对uim和 的引用anthy

然后我跑了:

sudo apt update && sudo apt upgrade

如中所述这个 Reddit 话题

答案2

首先安装/升级 uim-common。 (软件包所需的正确版本如图所示)如果您没有使用 apt 获得它,请使用 dpkg 及其强制选项。

答案3

通过注释行编辑vi /var/lib/dpkg/info/uim-anthy.prerm文件

if which uim-module-manager >/dev/null 2>&1; then
    uim-module-manager --unregister anthy-utf8 --path /var/lib/uim
fi

并执行apt-get --fix-broken install.修复完成后,文件内容将被恢复。

答案4

这就是我为解决 UIM 及其包依赖项问题所做的操作。这会将 scm 文件放置到位并允许 ium-data 继续安装。

mkdir ~/tmp
cd ~/tmp
cp /var/cache/apt/archives/uim-data_1%3a1.8.8-9_all.deb .
ar vx uim-data_1%3a1.8.8-9_all.deb
tar -xJvf data.tar.xz
sudo cp -irav usr/share/uim/* /usr/share/uim/

一旦到位,我就可以继续“apt --fix-broken install”和“apt update”。

相关内容