I run Ubuntu 16.04. I want to run update-tlmgr-latest.sh on my machine (cf. The underlying problem farther down for details about that), but before I do this, https://www.tug.org/texlive/tlmgr.html says under "Disaster recovery" that I should

be sure your PATH is set to use the current TeX Live bin directory; the recovery archives use kpsewhich from PATH to figure out where to unpack themselves.

The problem, in short: I am definitely not "sure" about anything related to any of this, since my ubuntu capabilities are strictly limited to a minimum.

I tried the following:

sudo apt-get purge texlive


Package 'texlive' is not installed, so not removed

apt-get does not recognize my texlive installation, although it's installed, since I use it to compile my LaTeX documents.

which install-tl

has no output

which tlmgr


sudo su
which tlmgr

both produce


so root and the user account recognize the same directory for tlmgr (I think this might be important, but I don't really know why)

The underlying problem

I am trying to

tlmgr update --self

but all of

tlmgr update --all
tlmgr update --list
tlmgr update --self

gives me (this is taken from a similar question, but only the checksum and the last line number are different, the rest is the same):

(running on Debian, switching to user mode!) Unknown directive 
c59200574a316416a23695c258edf3a32531fbda43ccdc09360ee105c3f07f9fb77df17c4ba4c2ea4f3a5ea6667e064b51e3d8c2fe6c984ba3e71b4e32716955... ,
please fix it! at
/usr/share/texlive/tlpkg/TeXLive/TLPOBJ.pm line 210, line 5579.


sudo su
tlmgr update --self


(running on Debian, switching to user mode!)
cannot setup TLPDB in /root/texmf at /usr/bin/tlmgr line 5604.

I guess I am running Debian TL, since it's switching to user mode.

sudo apt-get install texlive

results in a double installation, cluttering the system.

The steps described in this post are a bit overwhelming, but if you think this would be the absolute best thing to do, I will.

  • 2
    In a terminal execute echo $PATH. If the path to your TeXLive binaries is included, that's done. I guess you haven't installed TeXLIve through the Ubuntu repositories but used the installer. That's why apt-get says that TeXLive isn't installed. – Skillmon Jul 9 '17 at 12:39
  • 1
    How should apt-get then know that it is installed on the system :) – Skillmon Jul 9 '17 at 12:42
  • 2
    And the binaries of your TeXLive are where? In /usr/share/? You might set the PATH to include the folders of your binaries with PATH=$PATH:/path/to/texlive/binaries (obviously with /path/to/texlive/binaries replaced by the correct path to the containing folder). This way for the current terminal ONLY the PATH is set to include the desired folder. – Skillmon Jul 9 '17 at 12:48
  • 2
    To find your binaries you might execute something like whereis pdftex or similar. – Skillmon Jul 9 '17 at 12:49
  • 1
    @thymaro I think it should work. What I would do in addition is to delete tlmgr from /usr/bin. Actually it could very well be that /usr/bin/tlmgr is just a symlink that points to some file in your texlive folder. I would try the folllowing: as root, cd /usr/bin and ls -l | grep texlive to list all executables that are symlinks to texlive. If you find any, delete them all. – Michael Palmer Jul 9 '17 at 18:20

Your Answer

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

Browse other questions tagged or ask your own question.