TransWikia.com

Error while updating TexLive using tlmgr

TeX - LaTeX Asked on April 5, 2021

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:
https://www.tug.org/texlive/pkginstall.html

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:

https://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/ctan/systems/texlive/tlnet
https://mirrors.ircam.fr/pub/CTAN/systems/texlive/tlnet
https://ctan.tetaneutral.net/systems/texlive/tlnet

Any idea what I can do next ?

EDIT: (more technical details)

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/texlive/2020/bin/x86_64-linux::/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin

$ which tlmgr
/usr/bin/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

One 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.

Correct answer by daleif on April 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP