切换环境(到装有 Cygwin 的机器)时,我从 pdflatex 收到如下错误:
kpathsea: Running mktextfm ptmr8t
/usr/share/texmf-dist/web2c/mktexnam: Could not map source abbreviation for ptmr8t.
/usr/share/texmf-dist/web2c/mktexnam: Need to update ?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t
This is METAFONT, Version 2.718281 (TeX Live 2013/Cygwin)
kpathsea: Running mktexmf ptmr8t
! I can't find file `ptmr8t'.
<*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t
Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t
Transcript written on mfput.log.
grep: ptmr8t.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t' failed to make ptmr8t.tfm.
kpathsea: Appending font creation commands to missfont.log.
! Font T1/ptm/m/n/12=ptmr8t at 12.0pt not loadable: Metric (TFM) file not found
.
<to be read again>
有什么问题?
答案1
这意味着您缺少字体(! Font T1/ptm/m/n/12=ptmr8t at 12.0pt not loadable: Metric (TFM) file not found
)。
根据本网站,Ubuntu 的软件包是texlive-fonts-recommended
。对于 Cygwin,软件包是texlive-collection-fontsrecommended
(使用标准Cygwin 安装程序)。
答案2
对于使用 BasicTeX 的用户,请运行:
sudo tlmgr install collection-fontsrecommended
答案3
我在使用 CentOS7.9 时也遇到了这个错误:
kpathsea: Running mktexmf cmr10
! I can't find file `cmr10'.
解决方案:软件包有类似的名称:
yum install texlive-collection-fontsrecommended