Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Debian and Ubuntu have very good texlive packaging. But I'd like to use tlmgr to have a more fine-grained control about upgrades and which packages I want to be installed. So how do I install "vanilla" TeXLive on Debian/Ubuntu? Also how do I make dpkg aware that I have TeXLive installed?

BTW: Debian & Ubuntu have TeXLive 2012 now ;-)

share|improve this question
5  
This might be a better fit for Super User or the Ubuntu SE site, since it's really about the Debian/Ubuntu packaging system, not anything specific to LaTeX. –  David Z Aug 5 '10 at 1:01
    
There's a bug for that: bugs.launchpad.net/ubuntu/+source/texlive-base/+bug/712521 . Looks like it might be time to start thinking about an upgrade to a 12.10 pre-release :) –  naught101 May 28 '12 at 13:04
2  
Ah, there's a PPA for 12.04 too: launchpad.net/~texlive-backports/+archive/ppa. Haven't tried it yet. –  naught101 May 28 '12 at 13:08
    
Could you please announce what vanilla is good for? Just because many people like me are using other distributions. I would like to look for a similar package. –  strpeter Feb 11 '13 at 23:27
1  
I successfully installed TeXLive 2013 on Ubuntu 12.04 following silex's answer (thanks for that!). Only problem I encountered was a bunch of not really working CTAN mirrors. You may need to change your default mirror by sudo perl install-tl -repository ftp.fu-berlin.de/tex/CTAN for example. –  user34273 Jul 28 '13 at 5:26
show 2 more comments

8 Answers

up vote 41 down vote accepted

Use the net installer script from this page on the official tug.org website to install “vanilla” TeXlive.

Tricking Ubuntu into satisfying the package dependencies is more involved and requires using the equivs package. There are basic guidelines for doing so in this post on TeXblog (an unofficial blog). (This page is a bit old and was aimed at older versions of Ubuntu.) The package list there is a bit old, but the same overall procedure should still work. I’m afraid I don’t have a list offhand of what the dummy package should contain; maybe someone else will. (You can always just create new dummy packages as need be if you try to install something it tells you you have unsatisfied texlive dependencies.)

share|improve this answer
12  
See also: tug.org/texlive/debian.html , section "Vanilla TeX Live on Debian" which is also valid for Ubuntu (since Ubuntu is a Debian based distribution) –  Axel Sommerfeldt Feb 8 '11 at 18:01
1  
I asked a related question here: tex.stackexchange.com/questions/52388/…. If anyone is having trouble installing vanilla texlive, perhaps some information in that post will help. –  void-pointer May 18 '12 at 13:28
add comment

These instructions are for Ubuntu 12.10 and TeX Live 2012, they will probably work on most Ubuntu/Debian distributions.

Installation

Installing "vanilla" TeX Live is not as hard as you think. Things you will need:

  • An internet connection.
  • A couple (3+) of GiB's of free space.
  • Root (sudo) powers.

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:

wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzf install-tl-unx.tar.gz
cd install-tl-20130125

Note that the install-tl-20130125 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:

sudo ./install-tl

This will start the installer. You can change all kind of options here, most of the time the default options are correct. 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/2012

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/2012/bin/* /opt/texbin

(Note: there should only be one subdirectory in /usr/local/texlive/2012/bin.)

Now you'll have to add /opt/texbin to your $PATH variable. This can be done by editing /etc/environment:

gksudo gedit /etc/environment

You'll see something like:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

You can change this to:

PATH="/opt/texbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

Now you'll need to logout and login again for the changes to take effect. Now start Terminal again and run:

which tex

This should show the following:

/opt/texbin/tex

Fake packages

Now TeX Live works, but it's also necessary to make Ubuntu think you've installed TeX Live. This can be done with the equivs package:

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

First you'll have to edit texlive-local. A good example can be found here. Change the years to '2012' and save.

gedit texlive-local

Now you can build the package and install it:

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

After this installing texworks through the package maintainer won't install TeX Live again.

Fonts

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

Updating

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 perl-tk:

sudo apt-get install perl-tk --no-install-recommends

Launcher

You can also create a launcher for Unity:

mkdir -p ~/.local/share/applications
gedit ~/.local/share/applications/tlmgr.desktop

Paste the following:

[Desktop Entry]
Version=1.0
Name=TeX Live Manager
Exec=gksudo "/opt/texbin/tlmgr -gui"
Terminal=false
Type=Application
Icon=system-software-update

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 rm /opt/texbin
sudo ln -s /usr/local/texlive/2013/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/2010

Uninstalling TeX Live

To remove TeX Live completely you need to undo everything you've done:

  • Remove the /opt/texbin symbolic link.
  • Remove /opt/texbin from the system path.
  • Remove /etc/fonts/conf.d/09-texlive.conf and update font cache.
  • Remove /usr/local/texlive.
  • Remove the package created with equivs.

References and sources

share|improve this answer
    
I've installed this succesfully, but I can't for the life of me figure out where the editor texworks is? Its not showing up in my Applications menu –  masfenix Feb 2 '13 at 3:14
    
@masfenix: TeXworks is not installed by TeX Live, you need to install it through the software center. –  Silex Feb 2 '13 at 10:31
1  
@Silex Thanks for the nice howto. Works perfect... –  Stefan Waldmann Feb 19 '13 at 12:27
    
Thank you for these instructions. They were a life-saver. I wouldn't regard the installation as hard but wouldn't regard it as easy, either... –  Glutanimate Mar 16 '13 at 12:28
    
How can I install extra packages such as texlive-publishers, on /usr/local/texlive/2013/? –  Rasoul Jul 4 '13 at 15:41
show 9 more comments

Some comments:

  1. According to the Ubuntu package listing, the texlive package is a dummy package whose only purpose is to install a decent selection of dependencies. So it is possible to install this texlive package without installing any of its dependencies. This requires using dpkg instead of aptitude (as far as I can see, and I don't know if it's possible through the synaptic package manager): passing the --ignore-depends=texlive option to dpkg will cause it to forego the dependency check. Then anything that depends on texlive will afterwards install fine (I believe), though if something depends on, say, texlive-bin then it will complain.

  2. Whilst checking the options for aptitude and dpkg for the above, I came across the following snippet from aptitude: the command

    aptitude install texlive&m
    

    will mark texlive as having been manually installed. (Note that the & will probably need some sort of shell escaping to avoid it being interpreted by the shell.) I believe this basically says to the system "I've installed this myself, so you can stop bothering with it.".

  3. Possibly the easiest solution (and the one I use myself) is to simply ignore the system one and install your own version as well. If you do this right, you get the best of both worlds because one possible problem with replacing the system version with your own version is that the upgade may break some dependencies from other packages. It's less likely with something like TeX, but you can imagine that lots might go wrong if you upgrade one of the core system libraries without upgrading all the programs that use it. This is what the /usr/local directory is for. Put your installation of TeXLive in /usr/local/texlive or somewhere using the standard installation (as mentioned by frabjous, for example). By ensuring that /usr/local appears before /usr/bin in your path, and that $TEXMFCNF points to the right place, you can effectively ignore the system installation whilst being able to fall back on it if necessary.

share|improve this answer
1  
Except that by policy none of the packages depend on the "decent selection packages" e.g. texlive since they are subject to change to something like equivs will be required. –  Dima Aug 5 '10 at 10:39
    
@Dima: I was afraid of that. In that case, I'd go for option 3 with option 2 if you really don't want to install the system version. –  Andrew Stacey Aug 5 '10 at 11:17
2  
Ad 2: packages marked as "manually installed" are still regular packages. The difference is that if all packages that depend on them are removed the "manually installed" packages will be kept. In contrast, if all packages that depend on an "automatically installed" package are removed, the package itself will be removed too. By default, manually installed packages are those that you actually select for installation in aptitude, automatically installed are those pulled in as dependencies. You can override this by marking a package as manually or automatically installed. So 2 would not work. –  Jan Hlavacek Aug 29 '10 at 3:32
    
@Jan Hlavecek: Thanks for the clarification. Option 3 seems best, then. –  Andrew Stacey Aug 30 '10 at 7:16
2  
concerning option 3, you don't need to set TEXMFCNF and it is recommended not to set it. Setting the PATH is enough. –  mpg Mar 17 '11 at 11:05
show 2 more comments

A paper about installing TeX Live 2011 on Ubuntu and other GNU/Linux distributions can be found on

ArsTeXnica, vol. 10 (in Italian)
TUGboat, vol. 32-1 (issue 100) (in English)
Die TeXnische Komödie, issue 3/2011 (in German)

Thanks to Karl Berry and Barbara Beeton for the revision of the TUGboat version, and to Heiko Oberdiek and Herbert Voß for the German translation.

The papers are, up to now, available only to members of GuIT, TUG, and Dante, respectively, but will be public in due time.

Note: the Italian and English versions are about TeX Live 2010, but it's sufficient to change 2010 into 2011 in all the steps.

share|improve this answer
    
it seems that access to the English version is restricted to tug members –  David Dec 23 '11 at 0:20
    
Yes, as are also the other versions. TUG discloses articles to everybody after one year, IIRC. –  egreg Dec 23 '11 at 0:29
add comment

I have successfully installed TeXLive on Ubuntu 11.10 on a 64bit machine.

I have condensed the steps linked to in frabjou's answer, which, while the instructions are clear, may leave many *buntu users wondering "how do I change the PATH variable?"

wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xvf install-tl-unx.tar.gz
cd install-tl*
sudo ./install-tl
  • at prompt, enter "i" to install
  • change PATH, I did so by editing ~/.bashrc:

    • 64 bit

      # PATH=/usr/local/texlive/2011/bin/x86_64-linux:$PATH
      cat "export PATH=/usr/local/texlive/2011/bin/x86_64-linux:$PATH" >> ~/.bashrc
      
    • 32 bit:

      cat "export PATH=/usr/local/texlive/2011/bin/i386-linux:$PATH" >> ~/.bashrc
      

caveat see the tug instructions for more details; e.g. if TeXLive 2011 has been previously installed, it needs to be removed

share|improve this answer
add comment

Fake packages

Following up Silex's excellent write-up: I have put a fake package texlive-dummy created by the equivs-build process into my PPA. (Package source.) If you are on Ubuntu 13.04, the following will provide the necessary dependencies without having to generate a package:

add-apt-repository ppa:krlmlr/ppa
apt-get update
apt-get install texlive-dummy

I intend to update this package to more recent versions of Ubuntu.

share|improve this answer
add comment

I wrote a script that automates Silex's answer and does (optionally) a lot more. It supports Ubuntu versions 12.04 up to 14.04.

Download install-tl-ubuntu and run it as

sudo ./install-tl-ubuntu

To download that script, run

wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu && chmod +x ./install-tl-ubuntu

Below I give the list of features from the GitHub repository

  • installs TeX Live 2013
    • automatically finds the fastest repository
    • gives updated progress of the install
    • restarts automatically if install fails
  • tlmgr can then be used to keep your install up-to-date
  • notifies apt so that apt does not try to install the Ubuntu texlive-* packages as dependencies (e.g. if you do sudo apt-get install lyx)
  • links to the folder where Ubuntu installs TeX files so that when you install Ubuntu packages (e.g. FoilTeX and noweb) with LaTeX files, they will be available
  • adds TeX Live fonts to be used system-wide
  • other font-related conveniences
    • tells AppArmor to allow Evince to access the TeX Live fonts
    • can install TrueType fonts that user provides (--truetype-dir)
    • can install IvriTeX Hebrew fonts (--hebrew)
  • optionally installs additional LaTeX files for common journals that are not included in TeX Live 2013 (--more-tex)
  • works non-interactively and thus can be added to a batch install script
  • tlmgr can be run from the desktop menu (if 'gksu' package is installed)
  • install can be done from an ISO file (--iso)

For more details, see

./install-tl-ubuntu --help
share|improve this answer
add comment

It should be noted that there is now a much easier way to install up to date versions of TeXLive. There are now official backports of newer versions of TeXLive, as detailed here.

This gets you to at least 2012, and it looks like newer versions of Ubuntu have 2013, so you can probably pull this package out of their repertories without damaging anything, though I wouldn't swear by that and you should consult an Ubuntu expert first.

share|improve this answer
    
texdoc,tlmgr which get's automatic updates for all new packages will be missing with 2012 backports and even distro specific latex packages are very old and cannot updated with tlmgr. Hence vanilla texlive installation is the way to do for taking advantage of full power of texlive distro and being latest. –  texenthusiast Dec 18 '13 at 3:10
    
@texenthusiast Ah, I didn't know that. Looking at the changelog once you get the newest version of ubuntu they are keeping the package up to date at least. Should I delete my answer? –  Canageek Dec 18 '13 at 3:34
    
actually backports was mentioned by naught101 user in comments. So I think backports is not too much advisable compared to the vanilla install if possible sorry to say delete the answer. But some people prefer to be with ubuntu's ppa also instead of being over latest. finally take your decision. –  texenthusiast Dec 18 '13 at 3:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.