Install vanilla LaTeX on Ubuntu 14.04


This post is more than 5 years old. While math doesn't age, code and operating systems do. Please use the code/ideas with caution and expect some issues due to the age of the content. I am keeping these posts up for archival purposes because I still find them useful for reference, even when they are out of date!

Note: There is now a PPA to install TeX Live 2016 for both Ubuntu 14.04 and 16.04-- checkout the new post: Install TeX Live 2016 on Ubuntu 16.04 .

In this post I will go through a vanilla installation of Tex Live-- you may not want to do this. I'm choosing this installation method because of the ability to stay current with LaTeX updates and greater flexibility. However, for most people I would suggest installing the LaTeX setup in Ubuntu 14.04 repositories-- search for texlive-full.

I will do the vanilla installation following the very thorough guide provided here: vanilla LaTeX at stackexchange The guide is for Ubuntu 12.10 but I'll be doing this on Ubuntu 14.04. This will install TeX Live 2013, which is scheduled to be replaced by TeX Live 2014 in July 2014. However, TeX Live 2013 is the current implementation at this point.

First, get the installer:

$ wget
$ tar -xzf install-tl-unx.tar.gz

This will create the directory install-tl-*** where *** will be numbers (looks like a date to me) that depends on when you try this installation. Next, change into the directory and start the installer. For me, this was:

$ cd install-tl-20140417
$ sudo ./install-tl

This will start the installer and you can specify the options you like. I took this opportunity to set the default paper size to letter instead of A4. Once satisfied, press I to start the install-- this will take quite a while (hours) due to the large size of the distribution.

Path for LaTeX

If you type:

$ pdflatex --version

at this point Ubuntu will still not know where to find the installation and suggest that you install something from the repository. To fix this, we create a link:

$ sudo ln -s /usr/local/texlive/2013/bin/* /opt/texbin

Then, we add the path to our environment file (I'll use vim, but you can use nano, emacs, etc.):

$ sudo vim /etc/environment

Before the edit, I had the following in environment::


which I change, to add our path:


Now, to get these changes working you have to logout. When you login again, try the following to make sure that the changes worked:

$ which tex

Telling Ubuntu LaTeX is installed

Now, because we didn't use apt-get to install Tex Live, Ubuntu needs to be told that it's installed. This can be accomplished with the equivs package in the Ubuntu repository:

$ sudo apt-get install equivs --no-install-recommends
$ mkdir /tmp/tl-equivs
$ cd /tmp/tl-equivs
$ equivs-control texlive-local

This will create the texlive-local file. An example of what the contents of this fill should look like is here: debian-equivs-2013-ex.txt I copied the contents into my texlive-local and changed the maintainer information to my details. Finally, we create this fake Debian package and install:

$ equivs-build texlive-local
$ sudo dpkg -i texlive-local_2013-1_all.deb

Updating LaTeX

The Tex Live manager, tlmgr, can be used from the terminal as described in this post: vanilla LaTeX at stackexchange However, the full path will have to be used. For example:

Update all packages that can be updated:

$ sudo /usr/local/texlive/2013/bin/x86_64-linux/tlmgr update --all

List packages that can be updated:

$ sudo /usr/local/texlive/2013/bin/x86_64-linux/tlmgr update --list

If you try either of the above commands at this date (June 2014) you will be told that TeX is frozen and no updates are allowed. This is done each year as the new TeX Live release is assembled and tested.

Finally, this install can moved to use TeX Live 2014 when it is released. See the notes here: vanilla LaTeX at stackexchange .