109

I freshly installed 'basic' version of TeX Live 2012 (not full, only basic version).

I have following line in my code: \usepackage[T1]{fontenc}

I get following error:

(/usr/local/texlive/2012/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/t1enc.def)
/usr/local/texlive/2012/texmf-dist/tex/latex/base/fontenc.sty:100: Font T1/cmr/
m/n/10=ecrm1000 at 10.0pt not loadable: Metric (TFM) file not found.
<to be read again> 
                   relax 
l.100 \fontencoding\encodingdefault\selectfont

/usr/local/texlive/2012/texmf-dist/tex/latex/base/fontenc.sty:100:  ==> Fatal error occurred, no output PDF file produced!

I understand that some packages are missing, however I do not know which ones.

Also, solution to this problem on most of the earlier posts is to install ubuntu latex recommended package, however please note that I am not using LaTeX from Ubuntu's software center (which is old TeX Live 2009) but rather have manually installed basic version of TeX Live 2012 as per instructions here: http://www.tug.org/texlive/quickinstall.html

Please let me know how do I solve this issue (I don't want to install complete version of TeX Live 2012, only those packages necessary to run this piece of code).

  • 3
    Do you have the cm-super package installed? – doncherry Oct 3 '12 at 18:02
  • 8
    You should do sudo tlmgr install ec and sudo tlmgr install cm-super. But the best thing you can do is to install the full version or you'll be always confronting with missing packages. – egreg Oct 3 '12 at 22:26
  • @egreg: Thanks, your answer solved my problem. – abhinavkulkarni Oct 4 '12 at 2:23
84

In this case, the missing file is ecrm1000.tfm according to the error message. To know which package it belongs to, you can use the command tlmgr search --file ecrm1000.tfm --global which finds it in package ec. So you have to install it with tlmgr install ec.

Then you may have other errors, other files to look up and other packages to install. Since the process may be cumbersome, you may want to install at least collection-latexrecommended and collection-fontsrecommended if you really don't want a full install.

An alternative would be to use the texliveonfly http://ctan.org/pkg/texliveonfly package which installs missing packages on the fly (see its documentation).

  • 9
    I had to add --global switch to find the file because otherwise the search appears to be only in the local installation: tlmgr search --file ecrm1000.tfm --global – Davor Cubranic Oct 16 '14 at 18:16
110

I just installed the recommended fonts and it worked for me. =) The command for a Debian based Linux distribution (including Ubuntu and Mint):

sudo apt-get install texlive-fonts-recommended
  • It's working well :) – Mohamed Yakout Oct 10 '15 at 22:04
  • This is much more straight-forward solution for the problem than the other ad-hoc fix. It worked for me. – Yu Shen Oct 25 '16 at 7:21
  • In tex live this is collection-fontsrecommended. – Loren Oct 27 '16 at 15:49
  • I used sudo apt-get install texlive-fonts-recommends --no-install-recommends which reduced the size to only around 5 MB – Anwar Mar 15 '17 at 21:05
  • This solution works and doesn't require me to manually install seventeen different packages. Thank you. – Braden Best Nov 16 '18 at 1:42
18

In case you are on Fedora:

sudo dnf install texlive-collection-fontsrecommended.noarch
8

On macOS / MacTeX install collection-fontsrecommended in the TeX Live Utility or tlmgr install collection-fontsrecommended from the command line.

0

I had multiple errors for several fonts with the textgreek package (Corrupted NFSS tables) and with XeTeX (Font \XeTeXLink@font=pzdr at 0.00002pt not loadable).

I tried to load the fonts like @mpg describes it but some errors were still present. For some fonts I didn't even get a result when I run tlmgr search --file <name> --global (e.g. LGRcmr.fd or some others).

I ended up with installing the huge cbfonts via tlmgr (tlmgr install cbfonts) like of @Ulrike Fischer suggested in this answer. This works now for me

protected by Community May 20 '16 at 15:47

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.