This question already has an answer here:

I just installed a newer version of Tex Live on Ubuntu 14.04 LTS 64 bit but when I type in the terminal: tex --version the answer is: TeX 3.1415926 (TeX Live 2013/Debian) Why if I just installed the 2016 version?

Thanks so much!

marked as duplicate by Martin Schröder, Stefan Pinnow, Mico, Mensch, barbara beeton Sep 20 '16 at 16:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    (1) welcome, (2) How and what exactly did you just install? My guess is you manually installed upstream texlive, but forgot to manually adjust the PATH variable correctly – daleif Sep 19 '16 at 15:11
  • Hello! Thanks! I downloaded from ctan.mirror.garr.it/mirrors/CTAN/systems/texlive/tlnet/… then I wrote in the terminal sudo ./install-tl from the directory where the installation script was located. Then I corrected the PATH in the ./bashsc script PATH=~/bin:/usr/local/texlive/2016/bin/x86_64-linux/":$PATH" Now when I type in the terminal tex --version TeX 3.14159265 (TeX Live 2016) – Aleh Sep 19 '16 at 15:35
  • You have probably not added the path correctly. – daleif Sep 19 '16 at 15:38
  • sorry I didn't finish to edit the answer... I need a Tex version higher then 4, plus when I compile the .tex file in the log I find: This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) – Aleh Sep 19 '16 at 15:44

Set the $PATH variable to include the binaries of the new TeX installation. On my computer, the programs of TeXLive are in the directory /usr/local/texlive/2016/bin/x86_64-linux, so I added the lines

export PATH=/usr/local/texlive/2016/bin/x86_64-linux:$PATH
export MANPATH=/usr/local/texlive/2016/texmf-dist/doc/man:$MANPATH
export INFOPATH=/usr/local/texlive/2016/texmf-dist/doc/info:$INFOPATH

to $HOME/.profile. To modify the path also for non-interactive shells (like for remote login), you may have to take extra steps depending on your shell and its habits when to load which initialization files. For bash, my $HOME/.bashrc contains

# If running interactively, then:
if [ "$PS1" ]; then
  ... all the commands and aliases only needed interactively
  source ~/.profile

In fact, the installation script tells you in the end which directory you have to include in your command path (as well as the adjustments regarding $MANPATH and $INFOPATH).

Additionally I suggest to deinstall the texlive packages from Ubuntu, to avoid that the two TeX installations accidentally interfere. Search for all packages starting with texlive-.

  • 1
    No! Do not add it to bashrc, then if, say, you are starting texmaker from a menu, then texmaker cannot find latex as it never execute a bash shell. Might be better to add it to .profile log out and in again. – daleif Sep 19 '16 at 15:38
  • I changed the path in profile and left bashrc as it was originally, but I still have the same problem... – Aleh Sep 19 '16 at 15:48
  • What does echo $PATH say? – gernot Sep 19 '16 at 15:56
  • If you change .profile you have to log out from your session and log in again for the changes to take effect. – gernot Sep 19 '16 at 15:57
  • 1
    @Aleh There is definitely no TeX version higher than 4. There will never, ever, be one because TeX versions are numbered by expanding the decimal places of pi. Your version is exactly the same version I have, installed today. So what's wrong with your current installation? – gernot Sep 19 '16 at 17:20

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