无法从 Ubuntu 14.04 中删除 TeXLive 2016

无法从 Ubuntu 14.04 中删除 TeXLive 2016

我通过 PPA 安装了 TeXLive 2016,并使用了以下命令-

sudo add-apt-repository ppa:jonathonf/texlive
sudo apt update
sudo apt install texlive-full

由于某些原因,我尝试删除它,但无法删除。后来,我通过以下链接从官方网站安装了 TeXLive通过互联网安装 TeX Live。我使用了以下命令-

ravi@home:~/Downloads/install-tl-20180527$ sudo ./install-tl

现在,我可以在 Ubuntu 14.04 LTS 上使用 TeXLive 2018。Texmaker 4.1 (compiled with Qt 4.8.4 and Poppler 0.24.3)但是,我的 Ubuntu 显示以下错误-

在此处输入图片描述

看来 TeXLive2016 是罪魁祸首。我用过,sudo apt-get purge texlive*但没用。请参见下文-

The following packages have unmet dependencies:
 asymptote : Depends: texlive-latex-base but it is not going to be installed
             Depends: texlive-base-bin
             Depends: texlive-pstricks but it is not going to be installed
 dvipng : Depends: texlive-base-bin
 feynmf : Depends: texlive-latex-base but it is not going to be installed
          Depends: texlive-font-utils but it is not going to be installed
          Depends: texlive-extra-utils but it is not going to be installed
 fragmaster : Depends: texlive-base-bin
              Depends: texlive-latex-base but it is not going to be installed
              Depends: texlive-latex-recommended but it is not going to be installed
              Depends: texlive-extra-utils but it is not going to be installed
              Depends: texlive-font-utils but it is not going to be installed
 latex-beamer : Depends: texlive-latex-base but it is not going to be installed
 latex-xcolor : Depends: texlive-latex-recommended but it is not going to be installed
 latexmk : Depends: texlive-latex-base but it is not going to be installed
 pgf : Depends: texlive-latex-recommended but it is not going to be installed
 prosper : Depends: texlive-latex-base but it is not going to be installed
           Depends: texlive-pstricks but it is not going to be installed
           Depends: texlive-latex-recommended but it is not going to be installed
 purifyeps : Depends: texlive-metapost but it is not going to be installed
 tex4ht-common : Depends: texlive-base-bin
                 Recommends: tex4ht but it is not going to be installed
 tipa : Depends: texlive-latex-base but it is not going to be installed
        Depends: texlive-base-bin
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get autoremove也尝试过sudo apt-get -f install。请参见下文-

ravi@home:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  luatex texlive-binaries texlive-extra-utils texlive-font-utils
  texlive-fonts-recommended texlive-fonts-recommended-doc
  texlive-generic-recommended texlive-latex-base
The following packages will be REMOVED:
  context
The following NEW packages will be installed:
  luatex texlive-binaries texlive-extra-utils texlive-font-utils
  texlive-fonts-recommended texlive-fonts-recommended-doc
  texlive-generic-recommended texlive-latex-base
0 upgraded, 8 newly installed, 1 to remove and 264 not upgraded.
1 not fully installed or removed.
Need to get 0 B/30.2 MB of archives.
After this operation, 9,608 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 295461 files and directories currently installed.)
Removing context (2016.05.17.20160523-1~ubuntu14.04.1york0) ...
unknown option: format
dpkg: error processing package context (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 context
E: Sub-process /usr/bin/dpkg returned an error code (1)

请问有什么解决方法吗?

答案1

你应该使用命令以正确的方式删除 PPA ppa-purge。它会将软件包降级到官方存储库中的版本,然后才会从/etc/apt/sources.list.d/

您需要运行的命令如下:

#sudo add-apt-repository ppa:jonathonf/texlive # add you PPA again if removed
sudo apt-get install ppa-purge # install ppa-purge
sudo ppa-purge ppa:jonathonf/texlive # downgrade packages

然后使用以下命令安装 TeXLive 2018:

cd ~/Downloads/install-tl-20180527
sudo ./install-tl

相关内容