Installing TeXlive
2021-04-23
·
3 min read
Installing the distribution TeXlive.
Table of Contents
1 General information
- TeX Live — the most complete LaTeX distribution supported by the TeX community.
- Supports a large number of operating systems.
- Developed since 1996.
- Based on the teTeX distribution.
- MacTeX — a variant for MacOS.
- Main page: https://www.tug.org/texlive/.
- TeX Live — is a distribution with continuous updates as part of the annual version of the distribution.
2 Installation from distribution packages
- Ubuntu:
apt install texlive-full
3 Network installation on one computer
3.1 Installation using distribution scripts
- Links on the site are to mirrors. The mirror is selected automatically.
- Download the installer:
- Unix: https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
cd /tmp/
wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
- Windows: https://mirror.ctan.org/systems/texlive/tlnet/install-tl-windows.exe
- For Windows: run the executable file and install.
- For Linux
- Unpack the downloaded file:
tar xzvf install-tl-unx.tar.gz
- Go to the unpacked directory and run the installer:
cd install-tl-[0-9]*
sudo ./install-tl
- It is recommended to create links to executable files in the
/usr/local/bin
directory. To do this, in the console version of the utility, select theO
option, and thenL
. To return to the previous menu, useR
.
3.2 Installing with a package manager
- Windows. Use the Chocolatey package manager (see Package manager for Windows. Chocolatey).
choco install texlive
4 Network installation on multiple computers
4.1 File server
- A copy of the TeX Live archive is stored on the file server.
- We store it in the directory
/com/lib/portage/extras/texlive
(of course, you can choose any). - We share this directory via NFS (for example).
- Let’s make a script for daily download:
#!/bin/bash
# /etc/cron.daily/texlive-rsync-tree
RSYNC_MIRROR=rsync://mirrors.mi.ras.ru/CTAN/
mkdir -p /com/lib/portage/extras/texlive
rsync -rltpD -v -HS --delete ${RSYNC_MIRROR}/systems/texlive/tlnet/ /com/lib/portage/extras/texlive
4.2 Clients
4.2.1 Installation
- First, install manually on clients. To do this, run on the client:
/com/lib/portage/extras/texlive/install-tl --repository=/com/lib/portage/extras/texlive
4.3 Update
- To update, use the script on the client:
#!/bin/bash
if [[ -d /com/lib/portage/extras/texlive ]]
then
tlmgr update --repository=/com/lib/portage/extras/texlive --self
tlmgr update --repository=/com/lib/portage/extras/texlive --all
else
tlmgr update --self
tlmgr update --all
fi
tlmgr path add
Code Snippet 1:
/etc/cron.weekly/texlive-update
5 Updating to the next version of TeXlive
- It is recommended to install the new version of TeXlive separately.
- But you can do a manual update using an existing installation.
- Let’s assume that our architecture is
x86_64-linux
. - If you have installed symbolic links to system directories (via installer option or
tlmgr path add
), remove them:
tlmgr path remove
- Move the entire TeXlive directory to match the new version, for example:
mv /usr/local/texlive/2024/ /usr/local/texlive/2025
- Remove package backups:
rm /usr/local/texlive/2025/tlpkg/backups/*
- Create links to executables:
/usr/local/texlive/2025/bin/x86_64-linux/tlmgr path add
- Download the latest version of the script
update-tlmgr-latest.sh
:
wget https://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh -O /tmp/update-tlmgr-latest.sh
- Run the script:
sh /tmp/update-tlmgr-latest.sh -- upgrade
- If you do not want to use the default repository for downloading new files, then replace it:
tlmgr option repository <reponame>
- Update the TeXlive package manager:
tlmgr update --self
- Update TeXlive packages:
tlmgr update --all
- Set symbolic links to executables in system directories (
/usr/local/bin
):
tlmgr path add
- You can recreate the cache lualatex under the user:
mv ~/.texlive2024 ~/.texlive2025
luaotfload-tool -fu
- If you don’t do this, the cache will be recreated on the first run of
lualatex
.