修复 Debian 上损坏的软件包依赖关系、损坏的管道错误

修复 Debian 上损坏的软件包依赖关系、损坏的管道错误

我的 texlive 包坏了,我尝试重新安装它,但当我运行 apt --fix-broken install 时,出现了 broken pipe 错误。我执行了 apt-get autoclean、apt-get autoremove、apt-get clean,但都没有解决问题。我该怎么办?

dpkg: error processing archive /tmp/apt-dpkg-install-Awvjbo/0-texlive-base_2020.20200417-1_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/texlive-doc/generic/iftex/iftex.pdf', which is also in package texlive-generic-extra 2016.20170123-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
dpkg: considering deconfiguration of texlive-base, which would be broken by installation of texlive-plain-generic ...
dpkg: yes, will deconfigure texlive-base (broken by texlive-plain-generic)
Preparing to unpack .../1-texlive-plain-generic_2020.20200417-1_all.deb ...
De-configuring texlive-base (2016.20170123-5) ...
Unpacking texlive-plain-generic (2020.20200417-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Awvjbo/1-texlive-plain-generic_2020.20200417-1_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/texlive-doc/bibtex/abstyles/README.gz', which is also in package texlive-generic-extra 2016.20170123-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../2-fonts-adf-accanthis_0.20190904-1.1_all.deb ...
Unpacking fonts-adf-accanthis (0.20190904-1.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Awvjbo/2-fonts-adf-accanthis_0.20190904-1.1_all.deb (--unpack):
 trying to overwrite '/usr/share/fonts/truetype/adf/AccanthisADFStd-Bold.otf', which is also in package ttf-adf-accanthis 0.20090423-2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../3-fonts-adf-gillius_0.20190904-1.1_all.deb ...
Unpacking fonts-adf-gillius (0.20190904-1.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Awvjbo/3-fonts-adf-gillius_0.20190904-1.1_all.deb (--unpack):
 trying to overwrite '/usr/share/fonts/truetype/adf/GilliusADF-Bold.otf', which is also in package ttf-adf-gillius 0.20090423-2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../4-fonts-adf-universalis_0.20190904-1.1_all.deb ...
Unpacking fonts-adf-universalis (0.20190904-1.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Awvjbo/4-fonts-adf-universalis_0.20190904-1.1_all.deb (--unpack):
 trying to overwrite '/usr/share/fonts/truetype/adf/UniversalisADFStd-Bold.otf', which is also in package ttf-adf-universalis 0.20090423-2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
dpkg: considering deconfiguration of texlive-base, which would be broken by installation of texlive-latex-extra ...
dpkg: yes, will deconfigure texlive-base (broken by texlive-latex-extra)
Preparing to unpack .../5-texlive-latex-extra_2020.20200417-1_all.deb ...
De-configuring texlive-base (2016.20170123-5) ...
Unpacking texlive-latex-extra (2020.20200417-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Awvjbo/5-texlive-latex-extra_2020.20200417-1_all.deb (--unpack):
 trying to overwrite '/usr/share/texlive/texmf-dist/tex/latex/classpack/classpack.sty', which is also in package texlive-htmlxml 2016.20170123-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
dpkg: considering deconfiguration of texlive-base, which would be broken by installation of texlive-formats-extra ...
dpkg: yes, will deconfigure texlive-base (broken by texlive-formats-extra)
Preparing to unpack .../6-texlive-formats-extra_2020.20200417-1_all.deb ...
De-configuring texlive-base (2016.20170123-5) ...
Unpacking texlive-formats-extra (2020.20200417-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Awvjbo/6-texlive-formats-extra_2020.20200417-1_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/texlive-doc/aleph/base/News', which is also in package texlive-omega 2016.20170123-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
dpkg: considering deconfiguration of texlive-base, which would be broken by installation of texlive-lang-other ...
dpkg: yes, will deconfigure texlive-base (broken by texlive-lang-other)
Preparing to unpack .../7-texlive-lang-other_2020.20200417-1_all.deb ...
De-configuring texlive-base (2016.20170123-5) ...
Unpacking texlive-lang-other (2020.20200417-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Awvjbo/7-texlive-lang-other_2020.20200417-1_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/texlive-doc/fonts/bengali/README', which is also in package texlive-lang-indic 2016.20170123-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
dpkg: considering deconfiguration of texlive-base, which would be broken by installation of texlive-latex-extra-doc ...
dpkg: yes, will deconfigure texlive-base (broken by texlive-latex-extra-doc)
Preparing to unpack .../8-texlive-latex-extra-doc_2020.20200417-1_all.deb ...
De-configuring texlive-base (2016.20170123-5) ...
Unpacking texlive-latex-extra-doc (2020.20200417-1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Awvjbo/8-texlive-latex-extra-doc_2020.20200417-1_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/texlive-doc/support/classpack/MANIFEST', which is also in package texlive-htmlxml 2016.20170123-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /tmp/apt-dpkg-install-Awvjbo/0-texlive-base_2020.20200417-1_all.deb
 /tmp/apt-dpkg-install-Awvjbo/1-texlive-plain-generic_2020.20200417-1_all.deb
 /tmp/apt-dpkg-install-Awvjbo/2-fonts-adf-accanthis_0.20190904-1.1_all.deb
 /tmp/apt-dpkg-install-Awvjbo/3-fonts-adf-gillius_0.20190904-1.1_all.deb
 /tmp/apt-dpkg-install-Awvjbo/4-fonts-adf-universalis_0.20190904-1.1_all.deb
 /tmp/apt-dpkg-install-Awvjbo/5-texlive-latex-extra_2020.20200417-1_all.deb
 /tmp/apt-dpkg-install-Awvjbo/6-texlive-formats-extra_2020.20200417-1_all.deb
 /tmp/apt-dpkg-install-Awvjbo/7-texlive-lang-other_2020.20200417-1_all.deb
 /tmp/apt-dpkg-install-Awvjbo/8-texlive-latex-extra-doc_2020.20200417-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

输出显示你正在尝试安装一组新的特科利部分软件包名称为新软件包的软件包。新软件包包含的文件也是旧软件包的一部分,因此dpkg在破坏已安装的软件包之前会出错。

方法 1

dpkg/dpkg-deb可以很好地自动解决包依赖关系,您可以尝试使用apt它:

apt install /tmp/apt-dpkg-install-Awvjbo/[0-8]-*1_all.deb

注意:使用上述命令时,请注意 glob 仅匹配所需的包。

方法 2

如果apt无法自动解决依赖关系,即删除冲突的旧特科利软件包,我会先手动删除旧软件包。先创建一些备份,但“删除” deb 软件包通常会保留数据和配置文件:

apt remove texlive-generic-extra ttf-adf-accanthis ttf-adf-gillius ttf-adf-universalis texlive-htmlxml texlive-omega texlive-lang-indic
apt install /tmp/apt-dpkg-install-Awvjbo/[0-8]-*1_all.deb

方法 3

理论上,可以操纵软件包文件列表,这样就dpkg不再识别冲突了。这样就可以安装新软件包而不删除旧软件包。但很可能这些软件包实际上还是有冲突的,或者旧软件包充其量只是过时了。然而,为了完整起见,文件列表通常位于:

/var/lib/dpkg/info/<package_name>.list

例如:

/var/lib/dpkg/info/texlive-generic-extra.list

相关内容