## TeX Live and Debian/Ubuntu

Page written by np&mp&rt

### Introduction

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:

• Debian: squeeze: 2009, wheezy (oldstable): 2012, jessie (stable): 2014, testing and sid: 2016, all details are here
• Ubuntu: hardy: 2007, lucid: 2009, natty: 2009, oneiric: 2009, precise (12.04LTS): 2009, raring (13.04): 2012, saucy (13.10): 2013, trusty (14.04LTS): 2013, utopic, vivia: 2014, wily: 2015, xenial (current stable): 2015, yakkety (dev): 2016. All details are here

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:

• TeX Live (>=2013):
texlive-nonbin: git://anonscm.debian.org/debian-tex/texlive-nonbin.git (web interface)
texlive-bin: git://anonscm.debian.org/debian-tex/texlive-bin.git (web interface)
• TeX Live 2012: svn://svn.debian.org/debian-tex/texlive2012 (web interface)
• TeX Live 2009: svn://svn.debian.org/debian-tex/texlive2009 (web interface)
• TeX Live 2007: svn://svn.debian.org/debian-tex/texlive-new (web interface)

### Some Documentation

The Debian TeX Task Force has written two documents on TeX on Debian, available in the tex-common package, or online (but be warned, these documents are slightly outdated):

There is also a talk given at EuroBachoTeX 2007: TeX (Live) on Debian.

### 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
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_2016-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 2016. For older releases use one of the following examples files: for TL 2015, for TL 2014, for TL 2013, for TL 2011.

### Problems with evince and local TeX Live installations

The following information is due to Gernot Salzer and was originally written on tex.sx:

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

• `evince` fails to show the `dvi` file. `evince` is supervised by `apparmor`, a kernel module for preventing applications from doing mischief, and is forbidden to use TeXLive installed below `\usr\local`. Result: `evince` fails to display `dvi` files if fonts have to be generated since it is not allowed to execute the required scripts. Fonts may be missing fairly easily due to the next problem, which prevents `evince` from finding fonts.

• `evince` generates fonts over and over again (taking its time). The place where to look for the main configuration file of TeX is hardcoded in `evince`. Since the local TeXLive installation uses a different place, `evince` will find no or an old configuration file. Result: `evince` complains about not finding fonts (because it looks in the wrong place) and then generates them again (which takes time) or fails to generate them because of the problem above (access to font generation scripts forbidden). If the fonts are generated (by the scripts of the new installation), they will be stored in a place where `evince` doesn't see them the next time (because of the wrong configuration), so the process repeats each time you view the document.

Solution of the apparmor problem

If the package `apparmor-utils` is installed, you can switch off apparmor-supervision of evince completely with the command

``````sudo aa-disable /usr/bin/evince
``````

Done!

If you don't want to install `apparmor-utils`, you can do it manually:

``````sudo ln -s /etc/apparmor.d/usr.bin.evince /etc/apparmor.d/disable/usr.bin.evince
``````

Then you have to reboot your computer, or a bit more elegantly, you can issue the commands

``````sudo service apparmor teardown
sudo service apparmor start
``````

Done!

Third possibility: If you want to keep `evince` under the supervision of `apparmor`, you have to adapt the supervision rules. For this, 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 reboot, issue the command

``````sudo service apparmor restart
``````

Done!

Solution of the configuration file problem

Put a link to the new configuration file 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

• TeXLive 2016, Ubuntu 16.04, evince 3.18.2

• TeXLive 2016, Ubuntu 16.10, evince 3.22

### Thanks

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

That's all folks; happy TeXing!

\$Date: 2016/10/23 04:56:41 \$;