您的当前位置:首页正文

linux安装texlive程序

2024-11-24 来源:个人技术集锦

tex 是文本格式渲染语言, 对数学公式特别友好,所以前沿的科研者基本都要掌握 tex 基本功。Latex 是一款优秀的tex渲染程序,可以直接输出PDF等格式文件。

texlive 是 Latex程序及其周边的一个非常优秀的程序管理包,随着社区的发展,其安装方式基本达到一键安装的简单程度了.

linux操作系统 安装参考 , windows/mac 操作系统 安装参考 .

我linux 安装, 开始使用的 apt 安装 texlive-full 一直卡在 一个配置一动不动。

强制停止后就一直报错,导致安装失败。

dpkg: dependency problems prevent configuration of texlive-full:
 texlive-full depends on context; however:
  Package context is not configured yet.

dpkg: error processing package texlive-full (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 texlive-full
E: Sub-process /usr/bin/dpkg returned an error code (1)

这是 官网的 截图, 我这里有说明需要准备7+GB以上的磁盘空间。

curl -L -o install-tl-unx.tar.gz https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
zcat < install-tl-unx.tar.gz | tar xf -
cd install-tl-*
# TEXLIVE_INSTALL_PREFIX 设置 安装路径, 记得这个目录要准备7个G以上硬盘空间。 
export TEXLIVE_INSTALL_PREFIX=~/programs/texlive_2024/ 
# 这里安装时间可能有点久,根据个人网络和电脑配置而定
perl ./install-tl --no-interaction
# 配置PATH到.bashrc 中, 这个目录可能要自己找找, 我这个时2024年版本的
exprot PATH=$PATH:$TEXLIVE_INSTALL_PREFIX/2024/bin/x86_64-linux

我这电脑和网安装了接近一个小时,安装结束提示的内容是

... ...
done
running package-specific postactions
finished with package-specific postactions

 ----------------------------------------------------------------------
 The following environment variables contain the string "tex"
 (case-independent).  If you're doing anything but adding personal
 directories to the system paths, they may well cause trouble somewhere
 while running TeX.  If you encounter problems, try unsetting them.
 
 Please ignore spurious matches unrelated to TeX. (To omit this check,
 set the environment variable TEXLIVE_INSTALL_ENV_NOCHECK.)

    TEXLIVE_INSTALL_PREFIX=~/programs/texlive_2024/
 ----------------------------------------------------------------------
Welcome to TeX Live!
See ~/programs/texlive_2024//2024/index.html for links to documentation.

The TeX Live web site (https://tug.org/texlive/) provides all updates
and corrections. TeX Live is a joint project of the TeX user groups
around the world; please consider supporting it by joining the group
best for you. The list of groups is available on the web
at https://tug.org/usergroups.html.

Add ~/programs/texlive_2024//2024/texmf-dist/doc/man to MANPATH.
Add ~/programs/texlive_2024//2024/texmf-dist/doc/info to INFOPATH.
Most importantly, add ~/programs/texlive_2024//2024/bin/x86_64-linux
to your PATH for current and future sessions.

Logfile: ~/programs/texlive_2024//2024/install-tl.log

参考

显示全文