报错如下:
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-full : Depends: asymptote but it is not going to be installed
Depends: vprerex (> 6.5.3-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
总之各种报错,无法通过apt或者aptitude包管理软件安装,这个时候我们可以通过LaTeX主页提供的安装方法来安装官方指引。具体方法是:
- 下载官方提供的安装程序,我此刻的最新版地址是:https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz
- 解压上述的压缩包,我们会得到一个 install-tl 的可执行文件。
- 执行:sudo perl install-tl -gui 来通过图形化界面的方式安装LaTeXLive,保证此过程联网。程序会自动使用国内路径下载,速度很快。
- 完成安装好记得添加路径,把以下内容添加到~/.bashrc 最后,我使用的是默认路径安装,建议你也采用默认安装。
- 接下来就可以使用LaTeX编译文档了。有问题可以查看官方文档有详细说明。
#LatexLive
PATH=/usr/local/texlive/2019/bin/x86_64-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2019/texmf-dist/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2019/texmf-dist/doc/info:$INFOPATH; export INFOPATH