latex is driving me batty -- ! Package fontspec Error: The font "DejaVu Sans" cannot be found.

Steven Smith steve.t.smith at
Fri Sep 13 13:12:40 UTC 2019

Here’s the ports I have on a working system that provide the DejaVu fonts:

> locate DejaVuSansMono.ttf | egrep -e '^/opt/local' | xargs port provides | sed -E -e 's/^[^:]+:[[:space:]]//' | uniq
> py37-matplotlib
> dejavu-fonts
> texlive-fonts-extra

The port texlive-fonts-extra should install this file, and everything should work:


The other two ports should be irrelevant.

The reinplace lines in the Portfile (below) should have removed all the spaces from this font name in the LaTeX file and added a “.ttf” to the find specification.

Did this happen? It doesn’t look like it from your LaTeX logs. Why isn’t there a .ttf? Which files are those? What happens if you go to ${worksrcpath}, edit the offending .tex file, and compile it by hand?

> This issue is supposed to be fixed in these lines:

More information about the macports-users mailing list