首页
学习
活动
专区
圈层
工具
发布

“`apt
EN

Unix & Linux用户
提问于 2019-10-21 06:34:17
回答 5查看 2.4K关注 0票数 4

TL;

博士

  • $ 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就在一个大$ sudo apt update; sudo apt upgrade的中间出去了。我不知道这是否导致了我的问题,但从那以后,我一直无法$ sudo apt upgrade

当我尝试$ sudo apt upgrade时,我得到以下错误:

代码语言:javascript
复制
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

代码语言:javascript
复制
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会出现错误。

我尝试在其他地方寻找解决方案,但的答案不起作用,建议我可能在"循环依赖地狱“中。这个reddit线程建议我运行$ sudo apt dist-upgrade,但是dist-upgrade也被这个问题破坏了。

我尝试过用uim卸载我的sudo apt remove 库,但这并没有克服未满足的依赖关系错误。

也许我应该在互联网的某个地方找到一个sigscheme-init.scm文件,创建一个/usr/share/uim/lib/目录并在那里复制.scm文件(以及它附带的任何其他文件)。但这看起来很难,很讨厌,我害怕它会弄坏什么东西。

有没有更好的方法来解决这个问题?也许是apt还是dpkg?或者以某种方式重新安装我所有的uim-related库?

其他我试过的东西,

  • $ sudo apt upgrade -f失败。
  • $ sudo apt reinstall 会导致相同的错误。

下面是我运行dpkg --configure -a时发生的情况

代码语言:javascript
复制
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

编辑: Update:我最后擦除了系统,所以我不能再测试什么工作/不工作了。

EN

回答 5

Unix & Linux用户

发布于 2019-12-03 21:31:54

我编辑了/var/lib/dpkg/status并删除了对uimanthy的所有引用。

然后我跑了:

sudo apt update && sudo apt upgrade

这个红边线所述

票数 2
EN

Unix & Linux用户

发布于 2019-10-21 06:51:45

第一次安装/升级uim-常见。(正确的版本所需的软件包显示)如果你没有得到它与apt,做它与dpkg和它的强制选项。

票数 0
EN

Unix & Linux用户

发布于 2020-12-20 17:07:34

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

代码语言:javascript
复制
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。修复完成后,文件内容将被还原。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/547854

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档