[Tex/LaTex] fontspec throwing error with lualatex – broken

fontspecluatex

I get an error when I try to include the fontspec package. Here is a minimum working example:

\documentclass{article}
\usepackage{fontspec}
\begin{document}
Hello
\end{document}

I'm trying to compile this using the following build command:
lualatex --file-line-error-style "%f".
Part of the output that I get is:

/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty:100: Font \EU2/lmr/m/n/
10=file:lmroman10-regular:script=latn;+trep;+tlig; at 10pt not loadable: metric
data not found or bad.
<to be read again>
relax
l.100 \fontencoding\encodingdefault\selectfont
?
/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty:100: Emergency stop.
<to be read again>
relax
l.100 \fontencoding\encodingdefault\selectfont
 269 words of node memory still in use:
   2 hlist, 1 rule, 1 kern, 1 attribute, 41 glue_spec, 1 attribute_list, 2 if_st
ack, 1 write, 1 dir nodes
   avail lists: 2:8,3:1,4:1,6:2,9:2
/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty:100:  ==> Fatal error o
ccurred, no output PDF file produced!

I would greatly appreciate any insight that you may have on this issue. I am using Linux Mint 16, with the standard texlive-luatex available in the repositories. Thank you.

Edit: upon request from user phg, here is the output from luaotfload-tool --version

luaotfload-tool version “2.3”
database version “2.207”
Lua interpreter: stock; version “Lua 5.2”

and luaotfload-tool --diagnose=environment,permissions

luaotfload | diagnose : Loading file hashes.
luaotfload | diagnose : =============== file permissions ==============
luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic.
luaotfload | diagnose : Owner: 1000, group 1000, permissions rwxrwxr-x.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/.
luaotfload | diagnose : Owner: 1000, group 1000, permissions rwxrwxr-x.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/luaotfload-names.lua.
luaotfload | diagnose : Owner: 1000, group 1000, permissions rw-rw-rw-.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/luaotfload-names.luc.
luaotfload | diagnose : Owner: 1000, group 1000, permissions rw-rw-rw-.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/luaotfload-lookup-cache.lua.
luaotfload | diagnose : Owner: 1000, group 1000, permissions rw-rw-rw-.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/luaotfload-lookup-cache.luc.
luaotfload | diagnose : Owner: 1000, group 1000, permissions rw-rw-rw-.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Everything appears to be in order, you may sleep well

Thanks for the prompt feedback!

Best Answer

I have just faced the same problem and it turns out that the solution was to install the lmodern package. If I understand correctly this also installs the fonts-lmodern package which contains the missing font file lmroman10-regular that lualatex was complaining about. (lmodern seems to contain font files for pdfTeX)

The conclusion is that this is perhaps not a TeX problem but rather a package dependency problem in the Linux Mint distribution (I am on Linux Mint Debian Edition). Still it seems a bit weird that lualatex requires a font that is not even used in the document.

Related Question