Unable to compile PDF in R Studio (LaTeX Error: File `lmodern.sty' not found.)
As you are on an Ubuntu box:
edd@max:~$ locate lmodern.sty ## look for this file/usr/share/texmf/tex/latex/lm/lmodern.styedd@max:~$ dpkg -S $(locate lmodern.sty) ## look for package with this filelmodern: /usr/share/texmf/tex/latex/lm/lmodern.styedd@max:~$
indicating that you want to install the lmodern
package:
sudo apt-get install lmodern
You can also search online at package.Ubuntu.com which also suggests the lmodern package.