After upgrading my texlive distribution to v2020 on my linux machine lualatex stopped working altogether producing the same fatal error for all projects. Even compiling the following minimal source file main.tex using lualatex --interaction=batchmode main.tex



yields the following errors:

This is LuaHBTeX, Version 1.12.0 (TeX Live 2020)
 restricted system commands enabled.
luaotfload | load : FATAL ERROR
luaotfload | load :   × Failed to load "fontloader" module "basics-gen".
luaotfload | load :   × Error message:
luaotfload | load :     × "...020/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua:301: system : no writeable cache path, quiting".
stack traceback:
        ...ive/2020/texmf-dist/tex/luatex/luaotfload/luaotfload.lua:206: in local 'load_fontloader_module'
        ...020/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua:303: in upvalue 'init_main'
        ...020/texmf-dist/tex/luatex/luaotfload/luaotfload-init.lua:584: in function 'luaotfload-init.lua'
        ...ive/2020/texmf-dist/tex/luatex/luaotfload/luaotfload.lua:330: in field 'main'
        [\directlua]:1: in main chunk

The Texlive-2019 version of lualatex as well as both pdflatex versions work fine and produce an empty document without errors.

As I've used the official texlive installer and its suggested default settings to install both distributions (to /usr/local/texlive/2019/... and /usr/local/texlive/2020/..., respectively) I am utterly clueless as to what may be the problem here since I haven't had any problems with the 2019 distribution.

Any help? Thanks!

update: I managed to get it to work by explicitly setting the TEXMFVAR environment variable to $HOME/.texlive2020/texmf-var which is the default value suggested by the installer script. Did I make a mistake during the installation process? I didn't have to export the envvar before.

The output of kpsewhich -var-value=TEXMFCACHE is

  • Welcome to TeX StackExchange! What is the output of kpsewhich -var-value=TEXMFCACHE on your system (under TeX Live 2020)? Commented Feb 10, 2021 at 13:32
  • @MarcelKrüger I updated the question to contain the output. Does that suggest what the problem might be? Commented Feb 10, 2021 at 15:55
  • For some reason you got a weird TEXMFVAR, but it's hard to say why. You might want to look into "/usr/local/texlive/2020/texmf.cnf". Maybe you set TEXMFVAR to something there? (e.g. because you changed it in the installer) Commented Feb 10, 2021 at 21:08
  • The texmf.cnf explicitly listed TEXMFVAR = TEXMFSYSVAR which may explain the problem. I set TEXMFVAR = $HOME/.cache/texlive2020/texmf-var which solves the problem without having to export any environment variables. Commented Feb 11, 2021 at 9:59

2 Answers 2


Looks like something went wrong during installation, causing the cache direcory setting to refer to a path owned by root.

I manually set the TEXTMFHOME and TEXMFVAR parameters inside the /usr/local/texlive/2020/texmf.cnf configuration file to refer to local directories which solved the problem.

TEXMFHOME = $HOME/.cache/texlive2020
TEXMFVAR = $HOME/.cache/texlive2020/texmf-var/

I experienced the same problem. My profile on Windows contained an UTF-8 character. After I changed that the problem dissapeared. [That was a whole process!]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .