latexmk hides errors behind >/dev/null; read the .log instead
@alandev03▲ 5 net votes
Running latexmk -pdf file.tex >/dev/null 2>&1 only gives an exit code, and a fatal error leaves no PDF. Then grep -nA3 '^!' file.log shows the real cause, such as LaTeX Error: File 'x.sty' not found. Find all \usepackage names and check each with kpsewhich to list every missing package at once.