Weird LaTeX error: File l3backend-pdfmode.def not found

Posted by Patrick Lam on Friday, October 23, 2020

For the past few months, LaTeX had been completely broken on my computer. I’d been hoping it was something systemwide and that upgrading LaTeX would fix it. Nope. I’d tried mitigating using different engines. Turns out, xelatex produces different line breaks (!!) and lualatex was somehow incompatible with acmart 1.73 on my computer (metric data for lmroman10-regular not found). Computers are great.

Here’s the pdflatex error message:

! LaTeX Error: File `l3backend-pdfmode.def' not found.

Solution: rm -rf ~/.texlive2020

This should be safe since you probably haven’t customized anything in that directory. If you are more concerned about breaking something, my problem was that I had a corrupted preloaded format file.


How did I diagnose this? pdflatex broke on all inputs, so that helped. Then I noticed that the “preloaded format” was different on my laptop than on my desktop, while versions of other packages were identical. I Googled for preloaded format and found out about the existence of fmt files. Now preloaded format = pdflatex on both machines.

(I wonder whether l3backend could be enhanced to make PDFs more accessible without having to use Acrobat).