2

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

kebs
  • 859
  • Then it looks like you now have two larex installations and your tlmgr is the wrong one (the tell tell sign is the "switching to user mode" which is not present in the upstream/preferred texlive). So could you please show the contents of echo $PATH – daleif Aug 19 '20 at 15:06
  • Thansk @daleif, seems you spotted something. See my edit, and indeed, seems I have a 2016 version of tlmgr ! Any idea how I can fix this ? – kebs Aug 19 '20 at 15:11
  • That's the problem. The PATH is used from left to right so your 2020 stuff comes too late. Where did you add the texlive 2020 stuff to your PATH? It should be an easy fix – daleif Aug 19 '20 at 15:13
  • ok ! Indeed, the tlmgr from /usr/local/texlive/2020/bin/x86_64-linux says revision 54446 (2020-03-21 17:45:22 +0100), so I'll fix my path issue (or just remove the old tlmgr) and check. – kebs Aug 19 '20 at 15:19
  • I though I removed all of my previous install, but seems something failed here ! ;-) – kebs Aug 19 '20 at 15:19
  • You need to make sure the 2020 texlive path part comes first such that any left over stuff aren't seen first. I ask about where for a reason, if you change the path in a sub optimal way then any editor you start via a menu will not pickup the 2020 texlive, so just wanted to make sure you did it right (sadly it is a very common mistake) – daleif Aug 19 '20 at 15:22
  • Yeah, true, good advice, will do. Thanks. – kebs Aug 19 '20 at 15:24
  • 1
    See the answers here. I hope you scroll down to mine. – Davislor Nov 02 '20 at 03:45

1 Answers1

2

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.

kebs
  • 859
daleif
  • 54,450
  • For Ubuntu, the system-wide path setting seems to be located in the file /etc/environment. But ~/.bashrc can also be used. – kebs Aug 19 '20 at 20:15
  • 1
    @kebs that is ty bad one .bashrc I was hinting to in my comment. Bashrc does not affect programmes you might start from a menu. .profile is a better choice as it is read at login. – daleif Aug 20 '20 at 03:57