我想知道如何在 Ubuntu 中正确安装和使用 texlive 以及包管理器 tlmgr。这是我为安装 texlive 所做的:
sudo apt-get install texlive-latex-base texlive-latex-extra texlive-latex-recommended
Run Code Online (Sandbox Code Playgroud)
现在我确实有 texlive,但包管理器不起作用。以下是错误
sudo tlmgr update -all
(running on Debian, switching to user mode!)
cannot setup TLPDB in /home/kniwor/texmf at /usr/bin/tlmgr line 5336.
Run Code Online (Sandbox Code Playgroud)
有没有更好的方法来安装texlive?此时我可以做些什么来修复包管理器?
小智 60
只需tlmgr init-usertree先运行,然后运行sudo tlmgr update --all。
也许你会得到:
/usr/bin/tlmgr: Initialization failed (in setup_unix_one):
/usr/bin/tlmgr: could not find a usable xzdec.
/usr/bin/tlmgr: Please install xzdec and try again.
Couldn't set up the necessary programs.
Installation of packages is not supported.
Please report to texlive@tug.org.
tlmgr: exiting unsuccessfully (status 1).
Run Code Online (Sandbox Code Playgroud)
如果是这样,您必须xzdec从包管理器或通过sudo apt-get install xzdec.
要使用 GUI,您还需要安装perl-tk:
sudo apt-get install perl-tk
Run Code Online (Sandbox Code Playgroud)
然后你可以通过以下方式召唤 GUI:
tlmgr --gui
Run Code Online (Sandbox Code Playgroud)
然后按下Load Default按钮。