使用ISO镜像文件方式安装TexLive.
1 下载ISO文件
在清华大学开源软件镜像网站https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/下载。
2 安装TexLive
首先,进入root用户,挂载镜像文件,执行install-tl,
[pyengine@localhost 下载]$ su
密码:
[root@localhost 下载]# mount -o loop texlive.iso /mnt/
mount: /dev/loop0 写保护,将以只读方式挂载
[root@localhost 下载]# cd /mnt
[root@localhost mnt]# ./install-tl
报以下错误,原因是未安装perl-Digest-MD5,
Can't locate Digest/MD5.pm in @INC (@INC contains: ./tlpkg /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at tlpkg/TeXLive/TLCrypto.pm line 9.
BEGIN failed--compilation aborted at tlpkg/TeXLive/TLCrypto.pm line 9.
Compilation failed in require at tlpkg/TeXLive/TLPOBJ.pm line 17.
BEGIN failed--compilation aborted at tlpkg/TeXLive/TLPOBJ.pm line 17.
Compilation failed in require at ./install-tl line 153.
BEGIN failed--compilation aborted at ./install-tl line 153.
[root@localhost mnt]#
使用以下命令安装perl-Digest-MD5,并再次执行install-tl,安装过程需20分钟左右。
yum install perl-Digest-MD5
安装完成后,需设置环境变量,
vi ~/.bashrc
在.bashrc文件末尾加入以下内容,
export PATH=/usr/local/texlive/2021/bin/x86_64-linux:$PATH
export MANPATH=/usr/local/texlive/2021/texmf-dist/doc/man:$MANPATH
export INFOPATH=/usr/local/texlive/2021/texmf-dist/doc/man:$INFOPATH
最后,
source ~/.bashrc
卸载ISO文件,
umount /mnt/
3 测试
[pyengine@localhost ~]$ tex --version
TeX 3.141592653 (TeX Live 2021)
kpathsea version 6.3.3
Copyright 2021 D.E. Knuth.
There is NO warranty. Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.
上一篇:【已解决】将CentOS7系统安装至U盘(九):使用AppImage方式安装图形处理工具Draw.io和Inkscape)
下一篇:【已解决】将CentOS7系统安装至U盘(十一):安装MySQL-8.0.28
如有疑问,请联系微信pyengine(微信号:_Les_Miserables)。