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!
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!
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
else
source ~/.profile
fi
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-.
.profile log out and in again.
– daleif
Sep 19 '16 at 15:38
.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
.profile are prefixed with export.
– gernot
Sep 19 '16 at 16:10
export PATH=~/usr/local/texlive/2016/bin/x86_64-linux/":$PATH"
Then I started a new session as well, now the log file of my .tex says:
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2016.9.19) 19 SEP 2016 18:14
but the version is still the wrong one... I need a version higher than 4. Sorry, I am not so expert...
– Aleh Sep 19 '16 at 16:28echo $PATH says
/usr/local/texlive/2016/bin/x86_64-linux/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
– Aleh
Sep 19 '16 at 16:37
~/) or is it in /usr/local/... (which sounds more normal)
– daleif
Sep 19 '16 at 16:39
.profile with 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
– Aleh
Sep 19 '16 at 16:40
which latex (in a terminal) gives the correct path to latex
– daleif
Sep 19 '16 at 16:55
source ~/.profile: no need to start a whole new section. Nor do you need to add the export before each line. But @Aleh: your $PATH is now OK.
– jon
Sep 19 '16 at 18:37
export is necessary in ~/.profile since it may also be processed by other shells, including plain sh. What do you mean by starting a new section? Or did you mean session? If you want to make sure that also the programs started from the GUI take notice of the changed PATH, then sourcing the profile in some subsidiary command shell doesn't help.
– gernot
Sep 19 '16 at 19:21
source-ing would (only) affect the current instance of the terminal session. ... I lost the context of the bigger question as I only start programs from a shell. Does that impact the need for export also? I've never used export in .profile and I've never had a problem. How would I trigger the failure to find, say, pdflatex (just curious)?
– jon
Sep 19 '16 at 19:39
.profile file the PATH,MANPATH,INFOPATH lines, with export at the beginning of all of them. Thanks!
– Aleh
Sep 20 '16 at 08:12
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