无法使用 apt-get 安装任何东西。似乎存在未满足依赖项的错误

无法使用 apt-get 安装任何东西。似乎存在未满足依赖项的错误

在看到许多答案后已经尝试了以下命令但似乎都不起作用:

sudo apt-get install -f
sudo apt --fix-broken install
sudo dpkg -a --config
sudo apt-get autoclean
sudo apt-get autoremove

我粘贴了我在尝试安装任何东西时遇到的几行错误。

texlive-luatex : Depends: texlive-binaries (>= 2015.20160222.37495-1)
 texlive-math-extra : Depends: texlive-binaries (>= 2015.20160222.37495-1)
 texlive-metapost : Depends: texlive-binaries (>= 2015.20160222.37495-1)
 texlive-music : Depends: texlive-binaries (>= 2015.20160222.37495-1)
 texlive-omega : Depends: texlive-binaries (>= 2015.20160222.37495-1)
 texlive-pictures : Depends: texlive-binaries (>= 2015.20160222.37495-1)
 texlive-pstricks : Depends: texlive-binaries (>= 2015.20160222.37495-1)
                    Recommends: texlive-font-utils but it is not going to be installed
                    Recommends: texlive-extra-utils but it is not going to be installed
 texlive-science : Depends: texlive-binaries (>= 2015.20160222.37495-1)
 texlive-xetex : Depends: texlive-binaries (>= 2015.20160222.37495-1)
 tipa : Depends: texlive-base-bin
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

以下是我因失败的命令而得到的错误 sudo apt-get -f install::

Preparing to unpack .../texlive-fonts-extra-doc_2018.20180505-1~16.04.york0_all.deb ...
Unpacking texlive-fonts-extra-doc (2018.20180505-1~16.04.york0) over (2015.20160320-1) ...
dpkg: error processing archive /var/cache/apt/archives/texlive-fonts-extra-doc_2018.20180505-1~16.04.york0_all.deb (--unpack):
 trying to overwrite '/usr/share/doc/texlive-doc/latex/mweights/README', which is also in package texlive-latex-extra-doc 2015.20160320-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/texlive-fonts-extra-doc_2018.20180505-1~16.04.york0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我检查了,其他命令也出现同样的错误。

输出dpkg -l | grep york

iU  context                                       2018.04.04.20180416-1~16.04.york0            all          powerful TeX format
ii  libpython3.6-minimal:amd64                    3.6.3-1ubuntu1~16.04.york1                   amd64        Minimal subset of the Python language (version 3.6)
ii  libpython3.6-stdlib:amd64                     3.6.3-1ubuntu1~16.04.york1                   amd64        Interactive high-level object-oriented language (standard library, version 3.6)
iU  prosper                                       2018.20180505-1~16.04.york0                  all          TeX Live: transitional dummy package
ii  python3-gdbm:amd64                            3.6.3-0ubuntu1~16.04.york0                   amd64        GNU dbm database support for Python 3.x
iU  python3-tk:amd64                              3.6.5-3~16.04.york4                          amd64        Tkinter - Writing Tk applications with Python 3.x
ii  python3.6                                     3.6.3-1ubuntu1~16.04.york1                   amd64        Interactive high-level object-oriented language (version 3.6)
ii  python3.6-minimal                             3.6.3-1ubuntu1~16.04.york1                   amd64        Minimal subset of the Python language (version 3.6)
iU  texlive                                       2018.20180505-1~16.04.york0                  all          TeX Live: A decent selection of the TeX Live packages
iU  texlive-fonts-recommended-doc                 2018.20180505-1~16.04.york0                  all          TeX Live: Documentation files for texlive-fonts-recommended
iU  texlive-full                                  2018.20180505-1~16.04.york0                  all          TeX Live: metapackage pulling in all components of TeX Live
iU  texlive-htmlxml                               2018.20180505-1~16.04.york0                  all          TeX Live: transitional dummy package

输出apt-cache policy texlive-fonts-extra-doc

texlive-fonts-extra-doc:
  Installed: 2015.20160320-1
  Candidate: 2018.20180505-1~16.04.york0
  Version table:
     2018.20180505-1~16.04.york0 500
        500 http://ppa.launchpad.net/jonathonf/texlive/ubuntu xenial/main amd64 Packages
        500 http://ppa.launchpad.net/jonathonf/texlive/ubuntu xenial/main i386 Packages
 *** 2015.20160320-1 500
        500 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://in.archive.ubuntu.com/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status

答案1

由于您不需要 TeXLive 的精确版本,我建议删除jonathonf texlive PPA并从官方存储库安装软件包:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:jonathonf/texlive
sudo apt-get install -f
sudo apt-get dist-upgrade

相关内容