TeX Live and Debian/Ubuntu

Page written by np & rt


This page contains information on the Debian packaging of the TeX Live system, and on how to install “vanilla” TeX Live on your Debian/Ubuntu system.

Versions of TeX Live in Debian and Ubuntu

See what version of TeXLive is shipped in:

For changes between versions please see the Debian QA page for the relevant source package: texlive-base, texlive-bin, texlive-extra, texlive-lang.

Packaging TeX Live takes a lot of work, so the latest version is often not packaged. However, the world of TeX changes slowly, so this shouldn't be a problem for most users. However, if you really want or need vanilla TeX Live, we provide instructions to integrate it with Debian.

Support and bug reports

TeX Live is packaged for Debian by the Debian TeX Task Force. Please use the Debian Bug Tracking System to report bugs in the packages and to request new features; for general comments and suggestions about Debian packaging and this page, and most particularly to offer help, write to debian-tex-maint@lists.debian.org. For TeX Live problems that are not related to the Debian packaging, please write to the tex-live mailing list.

You can check out the Subversion (till 2012) or git (from 2013 on) repositories for the Debian packaging:

Installing the Debian/Ubuntu packages

To install the Debian/Ubuntu packages, just install the package texlive, e.g. from the Software Center or synaptic, or with the command:

apt-get install texlive

This will install texlive-latex-recommended, texlive-fonts-recommended, texlive-latex-base and texlive-base. You can go on and install additional packages (e.g. texlive-latex-extra) and additional languages (e.g. texlive-lang-german).

If you want to have a system closely mirroring a TeX Live DVD, install the package texlive-full, which pulls in the full set of TeX Live packages.

Integrating vanilla TeX Live with Debian

To install vanilla TeX Live so that it replaces the Debian packages, perform the following steps:

  1. Install vanilla TeX Live as root, system-wide.

  2. Ensure that the only Debian TeX Live packages installed are tex-common, texinfo, and perhaps lmodern
  3. Add TeX Live's bin directory to ENV_PATH in /etc/login.defs.
  4. Tell APT about your TeX Live installation by building a dummy package using equivs:

$ aptitude install equivs # as root
mkdir /tmp/tl-equivs && cd /tmp/tl-equivs
equivs-control texlive-local
# edit texlive-local (see below)
$ equivs-build texlive-local
$ sudo dpkg -i texlive-local_2023.99999999-1_all.deb

At the step "edit texlive-local", edit the Maintainer field and the list of the packages provided by your local TeX Live installation as appropriate. If you installed scheme-full except collection-texinfo as recommended, the file should look like the following example file for TL 2023. For older releases use one of the following examples files: for TL 2022, for TL 2021, for TL 2020, for TL 2019, for TL 2018, for TL 2017, for TL 2016, for TL 2015, for TL 2014, for TL 2013, for TL 2011.

Sample equivs file for TL 2023

We only provide sample equivs files for 2023 here.

Section: misc
Priority: optional
Standards-Version: 4.1.4

Package: texlive-local
Version: 2023.99999999-1
Maintainer: you <you@yourdomain.example.org>
Provides: asymptote, chktex, cm-super, cm-super-minimal, context,
 dvidvi, dvipng, dvisvgm, feynmf, fragmaster, jadetex, lacheck, 
 latex-cjk-all, latex-cjk-chinese, latex-cjk-chinese-arphic-bkai00mp,
 latex-cjk-chinese-arphic-bsmi00lp, latex-cjk-chinese-arphic-gbsn00lp,
 latex-cjk-chinese-arphic-gkai00mp, latex-cjk-common, latex-cjk-japanese,
 latex-cjk-japanese-wadalab, latex-cjk-korean, latex-cjk-thai, latexdiff,
 latexmk, latex-sanskrit, lcdf-typetools, lmodern, luatex,
 musixtex, preview-latex-style, ps2eps, psutils, purifyeps, t1utils,
 tex4ht, tex4ht-common, tex-gyre, texinfo, texlive, texlive-base,
 texlive-bibtex-extra, texlive-binaries, texlive-common, texlive-extra-utils,
 texlive-fonts-extra, texlive-fonts-extra-doc, texlive-fonts-recommended,
 texlive-fonts-recommended-doc, texlive-font-utils, texlive-formats-extra,
 texlive-games, texlive-humanities, texlive-humanities-doc, 
 texlive-lang-all, texlive-lang-arabic, texlive-lang-cjk, texlive-lang-cyrillic,
 texlive-lang-czechslovak, texlive-lang-english, texlive-lang-european,
 texlive-lang-japanese, texlive-lang-chinese, texlive-lang-korean,
 texlive-lang-french, texlive-lang-german, texlive-lang-greek,
 texlive-lang-italian, texlive-lang-other,
 texlive-lang-polish, texlive-lang-portuguese, texlive-lang-spanish,
 texlive-latex-base, texlive-latex-base-doc, texlive-latex-extra,
 texlive-latex-extra-doc, texlive-latex-recommended,
 texlive-latex-recommended-doc, texlive-luatex, texlive-math-extra,
 texlive-metapost, texlive-metapost-doc, texlive-music,
 texlive-pictures, texlive-pictures-doc, texlive-plain-generic,
 texlive-pstricks, texlive-pstricks-doc, texlive-publishers,
 texlive-publishers-doc, texlive-science, texlive-science-doc, texlive-xetex,
 thailatex, tipa, tipa-doc, xindy, xindy-rules
Architecture: all
Description: My local installation of TeX Live 2023.
 A full "vanilla" TeX Live 2023

Old versions: TL2011, TL2013, TL2014, TL2015, TL2016, TL2017, TL2018, TL2019, TL2020, TL2021, TL2022

Paper sizes

To change paper sizes, use the normal Debian method, as in (to be run as root or with sudo):

paperconfig -p a4

Debian's TeX packages are hooked into this, so will consequently follow the Debian-wide paper setting.

If for some reason you want to set the paper size only for the TeX programs (why?), you can use the tl-paper utility: run tl-paper --help for info.

The vanilla/upstream TL methods using tlmgr will not work.

Problems with evince and local TeX Live installations

The following information was originally provided on tex.sx.

The document viewer evince may exhibit two problems when trying to view dvi files in this arrangement.

Evince fails to display dvi files

When starting Evince from the command line, you see messages like

kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+100/600 --dpi 700 cmss12
mktexpk: Permission denied

Evince is supervised by apparmor, a kernel module for preventing applications from doing mischief, and is forbidden to use TeXLive in /usr/local. You can either switch off supervision completely by

sudo aa-disable /usr/bin/evince
(aa-disable comes with the apparmor-utils package), or you modify the apparmor rules. Add the following lines to /etc/apparmor.d/abstractions/evince:

# TeXlive 2016
/usr/local/texlive/2016/bin/x86_64-linux/mktexpk Cx -> sanitized_helper,
/usr/local/texlive/2016/bin/x86_64-linux/mktextfm Cx -> sanitized_helper,
/usr/local/texlive/2016/bin/x86_64-linux/dvipdfm Cx -> sanitized_helper,
/usr/local/texlive/2016/bin/x86_64-linux/mkofm Cx -> sanitized_helper,
/usr/local/texlive/** r,

and the following lines to /etc/apparmor.d/abstractions/ubuntu-helpers:

# TeXlive 2016
/usr/local/texlive/2016/texmf{,-dist}/web2c/{,**/}* Pixr,
/usr/local/texlive/2016/bin/x86_64-linux/* Pixr,

Insert the lines near similar-looking rules for Ubuntu-TeX. For these changes to take effect without rebooting, issue the command

sudo service apparmor restart

Evince re-generates fonts each time a dvi file is viewed

When starting Evince from the command line, you see messages like

kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+100/600 --dpi 700 cmss12
mktexpk: /home/someuser/.texlive2016/texmf-var/fonts/pk/ljfour/public/cm/cmss12.700pk already exists.

This is caused by Evince not finding the new configuration file for TeXLive 2016. The problem can be solved by putting a link to it into the folder /usr/local/share/texmf/web2c:

sudo mkdir -p /usr/local/share/texmf/web2c
sudo ln -s /usr/local/texlive/2016/texmf-dist/web2c/texmf.cnf /usr/local/share/texmf/web2c/texmf.cnf

Tested for

Thanks (from np)

I would like to thank Frank Küster, Sebastian Rahtz and Karl Berry for their support.

That's all folks; happy ?TeXing!


This page was originally hosted at https://tug.org/texlive/debian.html and maintained by ?NorbertPreining. Due to well known reasons the document has now been moved by ?NorbertPreining. Further updates should be made by Debian members.