我正在使用 Ubuntu 18.10。最近我厌倦了使用 LyX。在我阅读的有关使用 LyX 处理希伯来语的指南中,我被建议安装一个名为“ivirtex”的软件包。
在我明白了它不是必需的之后。但每当我尝试删除它时,都会引发此错误:
dpkg: error processing package ivritex (--remove):
installed ivritex package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
ivritex
E: Sub-process /usr/bin/dpkg returned an error code (1)
我已经尝试过了:
sudo apt-get install -f
sudo --configure -a
两者都不起作用。此外,每当我尝试安装另一个包时,我都会遇到与“iviritex”包相关的相同错误。
有什么办法可以强制删除这个包吗?
完整输出:
chicko@gal-chicko:~$ sudo apt remove ivritex
Reading package lists... 0%
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
ivritex
0 upgraded, 0 newly installed, 1 to remove and 11 not upgraded.
1 not fully installed or removed.
After this operation, 3,134 kB disk space will be freed.
(Reading database ... 220599 files and directories currently installed.)
Removing ivritex (1.2.1-1) ...
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/hebtech.cls to /usr/share/texmf/tex/generic/babel/hebtech.cls.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/hebcal.sty to /usr/share/texmf/tex/generic/babel/hebcal.sty.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/hebfont.sty to /usr/share/texmf/tex/generic/babel/hebfont.sty.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/hebrew_newcode.sty to /usr/share/texmf/tex/generic/babel/hebrew_newcode.sty.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/hebrew_oldcode.sty to /usr/share/texmf/tex/generic/babel/hebrew_oldcode.sty.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/hebrew_p.sty to /usr/share/texmf/tex/generic/babel/hebrew_p.sty.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/8859-8.def to /usr/share/texmf/tex/generic/babel/8859-8.def.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/cp1255.def to /usr/share/texmf/tex/generic/babel/cp1255.def.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/cp862.def to /usr/share/texmf/tex/generic/babel/cp862.def.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lheenc.def to /usr/share/texmf/tex/generic/babel/lheenc.def.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/rlbabel.def to /usr/share/texmf/tex/generic/babel/rlbabel.def.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/si960.def to /usr/share/texmf/tex/generic/babel/si960.def.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lheclas.fd to /usr/share/texmf/tex/generic/babel/lheclas.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lhecmr.fd to /usr/share/texmf/tex/generic/babel/lhecmr.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lhecmss.fd to /usr/share/texmf/tex/generic/babel/lhecmss.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lhecmtt.fd to /usr/share/texmf/tex/generic/babel/lhecmtt.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lhecrml.fd to /usr/share/texmf/tex/generic/babel/lhecrml.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lhefr.fd to /usr/share/texmf/tex/generic/babel/lhefr.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lheredis.fd to /usr/share/texmf/tex/generic/babel/lheredis.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lheshold.fd to /usr/share/texmf/tex/generic/babel/lheshold.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lheshscr.fd to /usr/share/texmf/tex/generic/babel/lheshscr.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/lheshstk.fd to /usr/share/texmf/tex/generic/babel/lheshstk.fd.tetex by ivritex', none removed.
No diversion 'diversion of /usr/share/texmf/tex/generic/babel/hebrew.ldf to /usr/share/texmf/tex/generic/babel/hebrew.ldf.tetex by ivritex', none removed.
mktexlsr: Updating /usr/local/share/texmf/ls-R...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST...
mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Done.
Regenerating '/var/lib/texmf/updmap.cfg-DEBIAN'...
Warning: Old configuration style found in /etc/texmf/updmap.d
Warning: For now these files have been included,
Warning: but expect inconsistencies.
Warning: These packages should be rebuild with tex-common.
Warning: Please see /usr/share/doc/tex-common/NEWS.Debian.gz
Warning: found file: /etc/texmf/updmap.d/20culmus-latex.cfg
done.
Regenerating '/var/lib/texmf/updmap.cfg-TEXLIVEDIST'... done.
update-updmap has updated the following file(s):
/var/lib/texmf/updmap.cfg-DEBIAN
/var/lib/texmf/updmap.cfg-TEXLIVEDIST
If you want to activate the changes in the above file(s),
you should run updmap-sys or updmap.
updmap [WARNING]: resetting $HOME value (was /home/chicko) to root's actual home (/root).
updmap [ERROR]: Either -sys or -user mode is required.
updmap [ERROR]: In nearly all cases you should use updmap -sys.
updmap [ERROR]: For special cases see http://tug.org/texlive/scripts-sys-user.html
dpkg: error processing package ivritex (--remove):
installed ivritex package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
ivritex
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
越想越远,最后遇到了这个问题: 如何删除/安装未完全安装的软件包?
第五个答案建议我这样做:
sudo rm /var/lib/dpkg/info/[package_name].*
此后,我只需要重做:
sudo apt-get remove [package_name]
一切又恢复正常了,感谢上帝。