[Tex/LaTex] Can’t locate TeXLive/TLConfig.pm in @INC

perltlmgr

When invoking tlgmr, especially in the course of a distribution upgrade, it fails very early with a PERL error Can't locate TeXLive/TLConfig.pm in @INC followed by a list for @INC in the following form : @INC contains: /2020/texmf-dist/scripts/texlive /2020/tlpkg etc.

Setting the PERL5LIB to the appropriate folder allows to get a little further but things still fail with

kpathsea: configuration file texmf.cnf not found in these directories: /2020/bin/x86_64-linux etc.

Best Answer

This happens when one invokes tlmgr by specifying a relative path to it that does not begin with ./, eg. user@machine:/opt/texlive$ 2020/bin/x86_64-linux/tlmgr update --self --all.

For some (PERL-related ?) reason, this makes tlmgr search for things under /2020/.

Use user@machine:/opt/texlive$ ./2020/bin/x86_64-linux/tlmgr update --self --all instead.

Related Question