How to fix Ubuntu LaTeX ! I can’t find file `ecrm1200′.


You want to compile your LaTeX file on Ubuntu using latex or pdflatex but you see an error message like this:

kpathsea: Running mktexmf ecrm1200
! I can't find file `ecrm1200'.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1200
Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1200
Transcript written on mfput.log.
grep: ecrm1200.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecrm1200' failed to make ecrm1200.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font T1/cmr/m/n/12=ecrm1200 at 12.0pt not loadable: Metric (TFM) file not fou
<to be read again> 
l.105 \fontencoding\encodingdefault\selectfont


sudo apt -y install texlive-fonts-recommended

This will install, among many other LaTeX files, and ecrm1200.tfm.