These instructions have been updated for Ubuntu 14.04 and TeX Live 2014, they will probably work on most Ubuntu/Debian distributions.
Installing "vanilla" TeX Live is not as hard as you think. Things you will need:
- An internet connection.
- About 4 GiB of free space (2 GiB if not installing documentation).
- Root (
Also: the instructions are meant for the terminal. If you're uncomfortable with that you can probably still install the
texlive-full package from the Software center.
TeX Live Installer
First the official installer needs to be downloaded with the following commands:
tar -xzf install-tl-unx.tar.gz
Note that the
install-tl-20140618 folder may be named differently. You can probably type
install-tl and then press tab to autocomplete the folder name.
Now the installation can begin, run:
This will start the installer. You can change all kind of options here, most of the time the default options are correct. In some cases changing the options can, of course, be helpful. Not installing the doc and source trees will save you a lot (1.8 GiB, 50%) of disk space. This comes with the downside of having to look up documentation online, instead of locally.
If you want to reduce disk space further you can also change the installation scheme or collections, but this will result in not having certain packages installed by default. You can, however, install them later through the TeX live manager.
Press i to start installation. Depending on your internet connection this may take a long time.
If, for some reason, the installation is interrupted it can probably be resumed by running the installer again. This will prompt you to continue the installation. If you want to start the installation from the beginning it's probably wise to remove the installed elements:
sudo rm -rf /usr/local/texlive/2014
Finalising the installation
If the installation completes successfully you will want to make sure your operating system can find it. This can be done by creating a symbolic link:
sudo ln -s /usr/local/texlive/2014/bin/* /opt/texbin
(Note: there should only be one subdirectory in
Now you'll have to add
/opt/texbin to your
$PATH variable. This can be done by editing
gksudo gedit /etc/environment
You'll see something like:
You can change this to:
Now you'll need to logout and login again for the changes to take effect.
Now start Terminal again and run:
This should show the following:
Now TeX Live works, but it's also necessary to make Ubuntu think you've installed TeX Live. This can be done with the
sudo apt-get install equivs --no-install-recommends
mkdir /tmp/tl-equivs && cd /tmp/tl-equivs
First you'll have to edit
texlive-local. A good example for TeX Live 2014 can be found here.
Now you can build the package and install it:
sudo dpkg -i texlive-local_2014-1_all.deb
After this installing
texworks through the package maintainer won't install TeX Live again.
If you want to install all OpenType and TrueType fonts so you can use them in other programs as well, you'll have to add the TeX Live fonts to the system configuration:
sudo cp $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
gksudo gedit /etc/fonts/conf.d/09-texlive.conf
Remove the line containing
type1 and save. Now run:
sudo fc-cache -fsv
You can now update TeX Live though the TeX Live Manager by running:
sudo /opt/texbin/tlmgr --gui
It might complain about missing 'Tk', this can be solved by installing
sudo apt-get install perl-tk --no-install-recommends
You can also create a launcher for Unity:
mkdir -p ~/.local/share/applications
Paste the following:
Name=TeX Live Manager
Comment=Manage TeX Live packages
Exec=gksu -d -S -D "TeX Live Manager" '/opt/texbin/tlmgr -gui'
Once again you'll need to logout and login again for the changes to take effect.
Upgrading to the next TeX Live
To upgrade you need to download and run the installer again. Afterwards you need to replace the symbolic link:
sudo ln -sf /usr/local/texlive/2014/bin/* /opt/texbin
It might also be a good idea to run the font section again. You can remove the old distribution by running:
sudo rm -rf /usr/local/texlive/2013
Uninstalling TeX Live
To remove TeX Live completely you need to undo everything you've done:
- Remove the
/opt/texbin symbolic link.
/opt/texbin from the system path.
/etc/fonts/conf.d/09-texlive.conf and update font cache.
- Remove the package created with
sudo apt-get purge texlive-local).
References and sources