TL 2024 cannot be installed on some Windows computers (again!)

Bruno Voisin bvoisin at icloud.com
Sun Dec 1 01:31:24 CET 2024


> Le 30 Nov 2024 à 17:18, Denis Bitouzé <denis.bitouze at univ-littoral.fr> a écrit :
> 
> But, IMHO, the TL installer should address this problem which, for
> beginners in particular, is discouraging or, more accurately, completely
> blocking.

It appears that, by default, the OS versions of the utilities called by the TL install script are preferred, save for tar on Windows, in which case the TL version is preferred.

There is a TEXLIVE_PREFER_OWN environment variable to change that. It's mentioned on the tlmgr man page

       "TEXLIVE_PREFER_OWN"
           By default, compression and download programs provided by the
           system, i.e., found along "PATH" are preferred over those shipped
           with TeX Live.

           This can create problems with systems that are too old, and so can
           be overridden by setting the environment variable
           "TEXLIVE_PREFER_OWN" to 1. In this case, executables shipped with
           TL will be preferred.

           Extra compression/download programs not provided by TL, such as
           gzip, lwp, and curl, are still checked for on the system and used
           if available, per the above. "TEXLIVE_PREFER_OWN" only applies when
           the program being checked for is shipped with TL, namely the lz4
           and xz compressors and wget downloader.

           Exception: on Windows, the "tar.exe" shipped with TL is always
           used, regardless of any setting.

In the TL doc, this is only mentioned about the changes for year 2019

  https://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-880009.1.16
  https://www.tug.org/texlive/doc/texlive-fr/texlive-fr.html#x1-9400010.1.16

So, on Unix-style systems (I'm on the Mac myself), this would be something like

  TEXLIVE_PREFER_OWN=1 install-tl -gui

I don't know how to achieve the same on Windows. I checked for a mention of that variable (or its effect) in the Advanced screen of the install GUI, there's none.

Actually I wasn't aware of the above at all, found it the hard way by looking at the code. Inside the install package, there's texmf-dist/scripts/texlive/tlmgr.pl which on lines 7155 ff. delegates the task of locating the executables to a setup_programs variable, writing

  # setup the programs, for w32 we need the shipped wget/xz etc, so we
  # pass the location of these files to setup_programs.

setup_programs is set in tlpkg/TeXLive/TLUtils.pm on lines 2890 ff., telling the OS utilities are preferred save for tar on Windows (the tar-specific code is on lines 2930 ff.).

That's where TEXLIVE_PREFER_OWN comes in. Say the comments there:

  If the C<$tlfirst> argument or the C<TEXLIVE_PREFER_OWN> envvar is set,
  prefer TL versions; else prefer system versions (except for Windows
  C<tar.exe>, where we always use ours).

I don't know why the same is not done for xz as for tar (ie ensuring that the TL version is used on Windows). Maybe simply the problem wasn't widely known.

Bruno




More information about the tex-live mailing list.