![Texlive 的路径问题](https://linux22.com/image/438364/Texlive%20%E7%9A%84%E8%B7%AF%E5%BE%84%E9%97%AE%E9%A2%98.png)
我遇到了路径问题(毫无疑问是我自己造成的),原因是首先安装然后卸载 MikTex,然后安装 TeXlive,然后在 tlmgr 中启动 --usermode(我认为我不需要)。
我可以从命令行界面运行 pdflatex、biber、bib2gls 和其他二进制文件(CLI 命令which pdflatex biber bib2gls
找到正确的二进制文件/usr/local/texlive/2021/bin/x86_64-linux
并使用它们。但是,kpsewhich
找不到任何二进制文件,这就是我怀疑是路径问题的原因。
输出结果tlmgr conf
如下:
=========================== version information ==========================
tlmgr revision 59291 (2021-05-21 05:14:40 +0200)
tlmgr using installation: /usr/local/texlive/2021
TeX Live (https://tug.org/texlive) version 2021
==================== executables found by searching PATH =================
PATH: /usr/local/texlive/2021/bin/x86_64-linux:/home/chaoborid/.fzf/bin:/snap/bin:/usr/local/games:/usr/games:/home/chaoborid/.local/bin:/home/chaoborid/.cargo/bin:/home/chaoborid/.local/share/applications:/usr/local/texlive/2021/texmf:/usr/local/texlive/2021:/usr/local/texlive/2021/bin/x86_64-linux:/usr/local/sbin:/home/chaoborid/.local/bin/:/home/chaoborid/bin:/usr/local/mysql/bin:/usr/local:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/home/chaoborid/.rvm/gems/ruby-2.3.0-Ruby/bin:/usr/local/bin/python3:/opt/texbin
dvipdfmx: /usr/local/texlive/2021/bin/x86_64-linux/dvipdfmx
dvips: /usr/local/texlive/2021/bin/x86_64-linux/dvips
fmtutil: /usr/local/texlive/2021/bin/x86_64-linux/fmtutil
kpsewhich: /usr/local/texlive/2021/bin/x86_64-linux/kpsewhich
luatex: /usr/local/texlive/2021/bin/x86_64-linux/luatex
mktexpk: /usr/local/texlive/2021/bin/x86_64-linux/mktexpk
pdftex: /usr/local/texlive/2021/bin/x86_64-linux/pdftex
tex: /usr/local/texlive/2021/bin/x86_64-linux/tex
tlmgr: /usr/local/texlive/2021/bin/x86_64-linux/tlmgr
updmap: /usr/local/texlive/2021/bin/x86_64-linux/updmap
xetex: /usr/local/texlive/2021/bin/x86_64-linux/xetex
=========================== active config files ==========================
config.ps: /usr/local/texlive/2021/texmf-config/dvips/config/config.ps
fmtutil.cnf: /usr/local/texlive/2021/texmf-dist/web2c/fmtutil.cnf
mktex.cnf: /usr/local/texlive/2021/texmf-dist/web2c/mktex.cnf
pdftexconfig.tex: /usr/local/texlive/2021/texmf-config/tex/generic/tex-ini-files/pdftexconfig.tex
texmf.cnf: /usr/local/texlive/2021/texmf.cnf
texmf.cnf: /usr/local/texlive/2021/texmf-dist/web2c/texmf.cnf
updmap.cfg: /usr/local/texlive/2021/texmf-dist/web2c/updmap.cfg
============================= font map files =============================
kanjix.map: /usr/local/texlive/2021/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map
pdftex.map: /usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map
ps2pk.map: /usr/local/texlive/2021/texmf-var/fonts/map/dvips/updmap/ps2pk.map
psfonts.map: /usr/local/texlive/2021/texmf-var/fonts/map/dvips/updmap/psfonts.map
=========================== kpathsea variables ===========================
ENCFONTS=.:{{}/home/chaoborid/.texlive2021/texmf-config,/home/chaoborid/.texlive2021/texmf-var,/home/chaoborid/texmf,!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2021/texmf-config,!!/usr/local/texlive/2021/texmf-var,!!/usr/local/texlive/2021/texmf-dist}/fonts/enc//
SYSTEXMF=/usr/local/texlive/2021/texmf-var:/usr/local/texlive/texmf-local:/usr/local/texlive/2021/texmf-dist
TEXCONFIG={{}/home/chaoborid/.texlive2021/texmf-config,/home/chaoborid/.texlive2021/texmf-var,/home/chaoborid/texmf,!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2021/texmf-config,!!/usr/local/texlive/2021/texmf-var,!!/usr/local/texlive/2021/texmf-dist}/dvips//
TEXFONTMAPS=.:{{}/home/chaoborid/.texlive2021/texmf-config,/home/chaoborid/.texlive2021/texmf-var,/home/chaoborid/texmf,!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2021/texmf-config,!!/usr/local/texlive/2021/texmf-var,!!/usr/local/texlive/2021/texmf-dist}/fonts/map/{kpsewhich,pdftex,dvips,}//
TEXMF={{}/home/chaoborid/.texlive2021/texmf-config,/home/chaoborid/.texlive2021/texmf-var,/home/chaoborid/texmf,!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2021/texmf-config,!!/usr/local/texlive/2021/texmf-var,!!/usr/local/texlive/2021/texmf-dist}
TEXMFCONFIG=/home/chaoborid/.texlive2021/texmf-config
TEXMFDBS={!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2021/texmf-config,!!/usr/local/texlive/2021/texmf-var,!!/usr/local/texlive/2021/texmf-dist}
TEXMFDIST=/usr/local/texlive/2021/texmf-dist
TEXMFHOME=/home/chaoborid/texmf
TEXMFLOCAL=/usr/local/texlive/texmf-local
TEXMFMAIN=/usr/local/texlive/2021/texmf-dist
TEXMFSYSCONFIG=/usr/local/texlive/2021/texmf-config
TEXMFSYSVAR=/usr/local/texlive/2021/texmf-var
TEXMFVAR=/home/chaoborid/.texlive2021/texmf-var
TEXPSHEADERS=.:{{}/home/chaoborid/.texlive2021/texmf-config,/home/chaoborid/.texlive2021/texmf-var,/home/chaoborid/texmf,!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2021/texmf-config,!!/usr/local/texlive/2021/texmf-var,!!/usr/local/texlive/2021/texmf-dist}/{dvips,fonts/{enc,type1,type42,type3}}//
VARTEXFONTS=/home/chaoborid/.texlive2021/texmf-var/fonts
WEB2C={{}/home/chaoborid/.texlive2021/texmf-config,/home/chaoborid/.texlive2021/texmf-var,/home/chaoborid/texmf,!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2021/texmf-config,!!/usr/local/texlive/2021/texmf-var,!!/usr/local/texlive/2021/texmf-dist}/web2c
==== kpathsea variables from environment only (ok if no output here) ====
我认为问题在于$TEXMFHOME
,它指向$HOME/texmf
,它不包含完整的 TL 程序集,并且我认为kpsewhich
应该在 的某个地方寻找/usr/local/texlive/2021
;大概是 ,/usr/local/texlive/2021/bin/x86_64-linux
它做包含正确的二进制文件。但我不确定。
我既可以从命令行编译文档,也可以从我的编辑器 (TeXstudio) 编译文档。但是,在我的编辑器中,我必须明确指向每个二进制文件/usr/local/texlive/2021/bin/x86_64-linux
才能使其工作(再次暗示了同样的问题)。我的编辑器无法检索包 texdoc,因为它找不到 texlive.tlpdb(这也暗示了同样的问题)。
两个问题:如果找不到我的二进制文件的原因kpsewhich
是路径问题,那么它应该指向哪条路径?如何更改该路径?
我在 Linux Pop!_OS 21.04 上运行。提前感谢您的任何建议。