如何修复 Ubuntu LaTeX ! I can't find file `ecrm1200'.

问题:

你想在 Ubuntu 上使用 latexpdflatex 编译你的 LaTeX 文件,但你看到类似这样的错误消息:

mktexmf_output.txt
kpathsea: Running mktexmf ecrm1200
! I can't find file `ecrm1200'.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1200

请输入另一个输入文件名
! 紧急停止。
<*> ...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
nd.
<to be read again>
                   relax
l.105 \fontencoding\encodingdefault\selectfont

解决方案

install_texlive_fonts_recommended.sh
sudo apt -y install texlive-fonts-recommended

这将安装 ecrm1200.mfecrm1200.tfm 以及许多其他 LaTeX 文件。


Check out similar posts by category: LaTeX, Linux