2

I recently installed Texlive 2018 on Ubuntu 18.04 following these instructions. and opted for basic installation.

Now I am trying to install some packages using tlmgr but it is showing that I have tlmgr 2017 instead of tlmgr 2018.

Output of tex --version:

TeX 3.14159265 (TeX Live 2018)
kpathsea version 6.3.0
Copyright 2018 D.E. Knuth.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.

Output of sudo tlmgr install <package name>:

(running on Debian, switching to user mode!)
tlmgr: Remote repository is newer than local (2017 < 2018)
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) --update
Please see https://tug.org/texlive/upgrade.html for details.

Output of tlmgr --version:

tlmgr revision 47303 (2018-04-05 19:52:22 +0200)
tlmgr using installation: /usr/local/texlive/2018
TeX Live (http://tug.org/texlive) version 2018

GUI when using command sudo tlmgr -gui:

tlmgr 2017

GUI when using command tlmgr -gui:

tlmgr 2018

So the problem is:

  1. When tlmgr 2017 is loaded I can't get update because remote version is 2018
  2. When tlmgr 2018 is loaded I don't have write permission.

I need to open tlmgr 2018 as administrator in order to install packages. How can I do that?

  • Personally, I prefer to install all tex packages at once and forget about any package problems. It's around to 2GB of downloading, but it's worth it. sudo apt-get install texlive-full I also advice you ask your question here. You will get answer since it's dedicated to latex questions. Good luck. – U. User May 17 '18 at 10:52
  • 1
    Since you installed TeXLive to your home directory, you should not run tlmgr with sudo! – fkraiem May 17 '18 at 11:36
  • More appropriate install directions are here: tug.org/texlive/debian.html – Stephen Michael Kellat May 18 '18 at 3:38
3

TL;DR: Run TeX Live Manager like this: sudo $(which tlmgr) -gui.

I had the same behavior when I installed TUG TeX Live after removing the texlive Ubuntu package. The issue was that tlmgr was still provided by some other package and I added the directory of the TUG TeX Live binaries to the PATH in ~/.bashrc, which apparently doesn't have any effect on sudo commands. However, the old 2017 version of tlmgr was in the PATH by default, so that was called in the sudo command. This can be fixed by feeding the full path of the TUG TeX Live Manager to sudo (this is what $(which tlmgr) does).

In order to avoid similar issues, and have a clean system, I recommend to remove all the packages called texlive* by running sudo apt remove texlive*, and then sudo apt autoremove.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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