I followed this instructions to install a vanilla version of texlive. Everything worked out fine except the part where I have finalize the installation. I used grep -n texbin /etc/environment || sudo sed -i.bak -e /PATH/s/\\\"$/:\\\/opt\\\/texbin\"/ /etc/environment to add the path to PATH. After logging out and signing in which tex still shows /usr/bin/tex which is my old installation of texlive, installed using apt-get, instead of opt/texbin as it should be.

When compiling a .tex file using xelatex I get erorrs and the header shows that it is the 2013 version instead of the 2015 I just installed. If I use /opt/texbin/xelatex everything works fine.

I figured out that I should add /opt/texbin/ at first in the /etc/environment. I did this, but even after rebooting echo $PATH doesn't show /opt/texbin at all and which tex still shows /usr/bin/tex.

I use Ubuntu 14.04 LTS and running in zsh.

How can I modify the file to fix this?

closed as off-topic by egreg, Martin Schröder, Jesse, user13907, Mensch Apr 3 '16 at 16:40

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome to TeX.SX! You should put /opt/texbin in front of the current value of PATH, not at the end. What's the output of echo $PATH after rebooting? – egreg Apr 3 '16 at 13:25
  • echo $PATH outputs /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games and /etc/environment contains PATH="/opt/texbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" – fukurai Apr 3 '16 at 13:33
  • 1
    Well, it seems that the change has not been seen. I usually go for the /etc/profile.d route, by adding a texlive.sh file in that directory, containing export PATH=/opt/texbin:${PATH}, rather than modifying /etc/environment. – egreg Apr 3 '16 at 13:36
  • Ok, so I wrote the short script in that directory, but still, after rebooting echo $PATH doesn't contain /opt/texbin Am I right that I don't have a folder texbin in /opt but rather a symlink named texbin? – fukurai Apr 3 '16 at 14:24
  • 4
    I'm voting to close this question as off-topic because the issue was due to settings in .zshrc – egreg Apr 3 '16 at 15:11