I have the following unexpected behaviour when I run tlmgr
- Running
tlmgr --version
tells me I'm running TeX Live 2020, namely the output is:
tlmgr revision 57119 (2020-12-13 00:40:00 +0100)
tlmgr using installation: /usr/local/texlive/2020
TeX Live (https://tug.org/texlive) version 2020
- Running
sudo tlmgr --gui
tells me I'm running TeX Live 2019 (‽), in particular:
tlmgr revision 53568 (2020-01-27 19:20:16 +0100)
tlmgr using installation: /usr/share/texlive
TeX Live (http://tug.org/texlive) version 2019
- Running
sudo su
and thentlmgr --gui
gives me again TeX Live 2020, with output:
tlmgr revision 57119 (2020-12-13 00:40:00 +0100)
tlmgr using installation: /usr/local/texlive/2020
TeX Live (https://tug.org/texlive) version 2020
Why is that, and how do I fix it?
I tried removing /usr/share/texlive
hoping that if tlmgr won't find it it would go about to search for /usr/local/texlive/2020
, but no luck.
It should be noted that I installed texlive 2020 on a fresh system, i.e. I never ever installed texlive 2019, which makes this behaviour even more surprising.
sudo
you don't export the user's environment, so the shell uses the default path. Apparently you have also installed the distribution provided TeX Live. I guess you're on a Debian based GNU/Linux system. AFAIR,sudo -e
exports the environment.dpkg
, but if you don't have disk space constraints having it shouldn't be a big problem, so long as the defaultPATH
is set up to have/usr/local/texlive/2020/bin/<arch>
at the beginning or, at least, before/usr/bin
/.