我在 16.04 上有一个可以运行的 texlive 版本,但在从 16.04 更新到 16.10 再到 17.04(也许还有其他版本?)后,它现在坏了。我已使用 apt-get 清除了所有 texlive 软件包:sudo apt-get purge tex*
我还清除了 dpkg 中的所有sudo dpkg --purge texlive
texlive 和相关软件包。以下所有操作均运行正常,没有错误:
sudo apt-get install -f
sudo apt-get update
sudo apt-get upgrade
sudo dpkg --configure -a
但是当我尝试安装 texlive 时我得到:
sudo apt-get install texlive
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed.
This may mean that you have requested an impossible situation or if you are
using the unstable distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
texlive : Depends: texlive-latex-recommended (>= 2016) but it is not going to be installed
Depends: texlive-latex-base (>= 2016) but it is not going to be installed
Depends: texlive-fonts-recommended (>= 2016) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
答案1
好的,在尝试了其他一些方法一段时间后,我安装了 aptitude,它能够提出一个解决方案(在尝试了第一个并失败后),该解决方案有效,降级libpathsea6
。详情:
oz@oz-linux:~$ sudo aptitude install texlive-latex-base
The following NEW packages will be installed:
fonts-lmodern{a} libpotrace0{a} libptexenc1{a} libsynctex1{a} libtexlua52{a} libtexluajit2{a} libzzip-0-13{a} lmodern{a}
texlive-base{a} texlive-binaries{ab} texlive-latex-base texlive-latex-base-doc{a}
0 packages upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 83.4 MB of archives. After unpacking 188 MB will be used.
The following packages have unmet dependencies:
texlive-binaries : Depends: libkpathsea6 (< 2016.20160513.41080.dfsg-1.1~) but 2017.20170613.44585-1~16.04.york0 is installed
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) texlive-base [Not Installed]
2) texlive-binaries [Not Installed]
3) texlive-latex-base [Not Installed]
4) texlive-latex-base-doc [Not Installed]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libkpathsea6 [2017.20170613.44585-1~16.04.york0 (now) -> 2016.20160513.41080.dfsg-1 (zesty)]
答案2
我遇到了类似的问题,我所做的是:sudo apt-get purge texlive
然后运行sudo apt-get autoremove
您提到的修复安装命令序列,然后运行命令:
sudo apt-get install texlive-full