Unable to install packages using tlmgr

1.6k views Asked by At

I have done a fresh installation of texlive on my linux system. When I try installing any packages using tlmgr, I get the following error:

(running on Debian, switching to user mode!)
(see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)
TLPDB: not a directory, not loading: /root/texmf
tlmgr: user mode not initialized, please read the documentation!

I have run the commands sudo tlmgr update --self and sudo tlmgr update --all but the same error pops up again. There is another instance of this error, but no solution was posted for it except for just reinstalling texlive which didnot work for me.

1

There are 1 answers

0
MastroGeppetto On

You should send at least the command you gave to have a meaningful answer. However, you probably have given the the install command as "sudo", which is not appropriate anymore for TexLive, as far as I understand.

Instead, you need to define first a texmf directory in your home directory (something like /home/sharan/texmf I guess) and then run tlmgr init-usertree. At this point, if the newly created local repo and the remote repo are synchronized, you should be able to successfully run tlmgr install for your package (missing info in your question).

However, it is highly possible that the repositories are not synchronized, especially if you installed the texlive package from your linux distribution (another missing detail in your question).

At this point you have three options:

  1. reinstall the latest release of the texlive package (not the one provided by your Linux distribution, see details googling texlive install) or
  2. abandon tlmgr and install the texlive package guessing the correct texlive package that contains the package (sudo apt install texlive-guesswhich)
  3. abandon tlmgr and install all texlive packages (sudo apt install texlive-full)

For Your Info, I use a 22.04 Ubuntu distribution, I run into this problem and I was lucky enough to find the right package (option 2). So I have not tested option 1 and 3, but I learned about them googling around.

Next time you have a question provide all data you can.