[Tex/LaTex] Error while updating TexLive using tlmgr


I have a working TeXLive 2020 on my Ubuntu machine, that I installed a couple a months ago (previously, was TeXLive 2018, I think).
The installation was done using the "prefered" TeXLive way (not from the OS package manager).

However, I encounter an error on a document that used to build correctly with the previous version. Basically, it can't find some package (bclogo, FWIW).

So I wanted to install it manually, and headed here:

But the command:

tlmgr update --list

fails (failed) with the message:

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

Checked that line in the Perl file is meaningless:

die("cannot setup TLPDB in $::maintree");

The folder /home/myusername/texmf exist, but is empty.

Ok, so maybe it needs to initialize some stuff in that user folder.
Indeed, with help from this question, I did this:

tlmgr init-usertree

followed by:

sudo apt-get install xzdec

(No idea what that package does…)

But now, the command:

tlmgr update --list

outputs another failure:

(running on Debian, switching to user mode!)
tlmgr: Cannot load TeX Live database from https://ctan.gutenberg.eu.org/systems/texlive/tlnet

When issuing the command multiple times, it seems to try a different mirror/URL every time, but none seem to fit. Although the servers are alive, I checked with a browser.

FWIW, here some others URLs that the command tries, and that fail too:


Any idea what I can do next ?

EDIT: (more technical details)

$ echo $PATH

$ which tlmgr

$ tlmgr --version
(running on Debian, switching to user mode!)
tlmgr revision 39298 (2016-01-07 03:44:29 +0100)
tlmgr using installation: /usr/share/texlive

Best Answer

From the running on Debian, switching to user mode! message it is very clear that this is not the upstream texlive 2020, which the which tlmgr update also later revealed.

Thus you currently have two Latex installations and the old (Debian modified) one comes first in the search PATH and is thus used.

The fix is fairly simple, make sure the texlive 2020 path you're added to $PATH comes first, and thus any program from it is chosen first.

Remember, after a $PATH change, you may need to log out and in again.