Tinytex: "FontAwesome" cannot be found

Created on 22 Feb 2019  路  14Comments  路  Source: yihui/tinytex

I'm using ropensci's vitae package to knit a rmarkdown file. I installed tinytex but ran into the "fontawesome not found" issue despite having fontawesome installed.

The error message I get is:

output file: cv.knit.md

tlmgr search --file --global '/FontAwesome[.](tfm|afm|mf|otf)'
Trying to automatically install missing LaTeX packages...
tlmgr install fontawesome
tlmgr: package repository http://mirror.hmc.edu/ctan/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr install: package already present: fontawesome
tlmgr path add
tlmgr search --file --global '/FontAwesome[.](tfm|afm|mf|otf)'
! Package fontspec Error: The font "FontAwesome" cannot be found.

Error: Failed to compile cv.tex. See cv.log for more info.
Execution halted

I've filed an issue on that package's page, but I'm beginning to suspect that it's a tinytex issue.

This is what I see when I find files in the /Users/username/Library/TinyTeX/ directory that have fontawesome in their names (the find . -name "fontawesome" command):

./texmf-dist/tex/latex/fontawesome
./texmf-dist/fonts/tfm/public/fontawesome
./texmf-dist/fonts/opentype/public/fontawesome
./texmf-dist/fonts/type1/public/fontawesome
./texmf-dist/fonts/enc/dvips/fontawesome
./texmf-dist/fonts/map/dvips/fontawesome

Most helpful comment

Finally I found you were using the Github version of the vitae package (neither of you showed your session info)... and I was able to reproduce the issue with the Github version.

The CRAN version works fine. So a certain commit since 2019-01-08 must have broken it (might be https://github.com/ropenscilabs/vitae/commit/47799a04fd10e773c5440c4a01078f0464e920d6).

All 14 comments

Could you run tinytex::tlmgr_update()?

I get this error when I update:

TeX::LSR: ls-R file not writable, skipping: /Users/<username>/Library/TinyTeX/texmf-var/ls-R
Cannot write ls-R in /Users/<username>/Library/TinyTeX/texmf-var. at /Users/<username>/Library/TinyTeX/texmf-dist/scripts/texlive/mktexlsr.pl line 583.

I googled around and it seems like my problem is very similar to https://github.com/rocker-org/rocker-versioned/issues/104.

This is what I see when I run tlmgr info fontawesome:

package:     fontawesome
category:    Package
shortdesc:   Font containing web-related icons
longdesc:    The package offers access to the large number of web-related icons provided by the included font. The package requires the package, fontspec, if run with XeTeX or LuaTeX.
installed:   Yes
revision:    48145
sizes:       run: 481k
relocatable: No
cat-version: 4.6.3.2
cat-date:    2017-04-18 05:31:40 +0200
cat-license: lppl1.3
cat-topics:  font font-supp-symbol font-symbol font-otf font-type1
collection:  collection-fontsextra

When I run sessionInfo() I see that I have tinytex_0.10. Thanks so much!

Could you check your TeX Live version?

$ tlmgr version
tlmgr revision 49885 (2019-01-31 20:27:00 +0100)
tlmgr using installation: ~/Library/TinyTeX
TeX Live (http://tug.org/texlive) version 2018

And could you try tinytex::reinstall_tinytex()?

I have the same TeX Live as yours:

tlmgr revision 49885 (2019-01-31 20:27:00 +0100)
tlmgr using installation: /Users/yiqinfu/Library/TinyTeX
TeX Live (http://tug.org/texlive) version 2018

When I reinstall, I get an error. Not sure if this is expected:

[1/21, ??:??/??:??] install: colortbl [4k]
[2/21, 00:00/00:00] install: dejavu [10474k]
[3/21, 00:02/00:06] install: environ [2k]
[4/21, 00:02/00:06] install: fancyhdr [5k]
[5/21, 00:02/00:06] install: fandol [21077k]
[6/21, 00:09/00:09] install: float [3k]
[7/21, 00:09/00:09] install: fontawesome [270k]
[8/21, 00:09/00:09] install: makecell [5k]
[9/21, 00:09/00:09] install: microtype [45k]
[10/21, 00:09/00:09] install: moderncv [22k]
[11/21, 00:09/00:09] install: multirow [3k]
[12/21, 00:10/00:10] install: setspace [8k]
[13/21, 00:10/00:10] install: tabu [24k]
[14/21, 00:10/00:10] install: threeparttable [6k]
[15/21, 00:10/00:10] install: threeparttablex [3k]
[16/21, 00:10/00:10] install: trimspaces [1k]
[17/21, 00:10/00:10] install: ulem [10k]
[18/21, 00:10/00:10] install: varwidth [5k]
[19/21, 00:10/00:10] install: wrapfig [10k]
[20/21, 00:10/00:10] install: xcolor [17k]
[21/21, 00:10/00:10] install: xecjk [126k]
**tlmgr: action install returned an error; continuing.**
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
**tlmgr: An error has occurred. See above messages. Exiting.**
done running updmap-sys.
tlmgr: package log updated: /Users/yiqinfu/Library/TinyTeX/texmf-var/web2c/tlmgr.log
TinyTeX installed to /Users/yiqinfu/Library/TinyTeX

I think the message tlmgr: An error has occurred can be safely ignored.

I just tried the vitae package by myself and I was not able to reproduce your issue.

````md

name: Marie Curie
position: "Professor"
address: "School of Physics & Chemistry, 脡cole Normale Sup茅rieure"
phone: +1 22 3333 4444
www: mariecurie.com
email: "Marie.[email protected]"
twitter: mariecurie
github: mariecurie
linkedin: mariecurie
date: "r format(Sys.time(), '%B %Y')"

output: vitae::hyndman

```{r setup, include=FALSE}
options(tinytex.verbose = TRUE)

# Some stuff about me

 * I poisoned myself doing research.
 * I was the first woman to win a Nobel prize
 * I was the first person and only woman to win a Nobel prize in two different sciences.
````

Here is my full log:

processing file: Untitled.Rmd
|...................... | 33%
inline R code fragments

|........................................... | 67%
label: setup (with options)
List of 1
$ include: logi FALSE

|.................................................................| 100%
ordinary text without R code

/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS Untitled.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output Untitled.tex --table-of-contents --toc-depth 2 --template /Users/yihui/R-tmp/vitae/rmarkdown/templates/hyndman/resources/hyndmantemplate.tex --number-sections --highlight-style tango --pdf-engine pdflatex --biblatex --wrap preserve --variable tables=yes --standalone --include-in-header /var/folders/8r/zh8x49md6vsgskh23jrmy7p80000gn/T//RtmpEWXNzI/cv-headerc634f0faf8.tex
output file: Untitled.knit.md

tlmgr search --file --global '/DejaVuSansMono.sty'
Trying to automatically install missing LaTeX packages...
tlmgr install dejavu
tlmgr: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
[1/1, ??:??/??:??] install: dejavu [10474k]
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
tlmgr: package log updated: /Users/yihui/Library/TinyTeX/texmf-var/web2c/tlmgr.log
tlmgr path add
tlmgr search --file --global '/carlito.sty'
Trying to automatically install missing LaTeX packages...
tlmgr install carlito
tlmgr: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
[1/1, ??:??/??:??] install: carlito [2662k]
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
tlmgr: package log updated: /Users/yihui/Library/TinyTeX/texmf-var/web2c/tlmgr.log
tlmgr path add
tlmgr search --file --global '/fontawesome.sty'
Trying to automatically install missing LaTeX packages...
tlmgr install fontawesome
tlmgr: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
[1/1, ??:??/??:??] install: fontawesome [270k]
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
tlmgr: package log updated: /Users/yihui/Library/TinyTeX/texmf-var/web2c/tlmgr.log
tlmgr path add
tlmgr install biber
tlmgr: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
[1/2, ??:??/??:??] install: biber.x86_64-darwin [15429k]
[2/2, 00:07/00:07] install: biber [1k]
tlmgr: package log updated: /Users/yihui/Library/TinyTeX/texmf-var/web2c/tlmgr.log
tlmgr path add

Output created: Untitled.pdf
```

I'm also having this issue with vitae and tinytex. I followed the advice in this issue and still have the problem. tinytex looks for FontAwesome, then installs fontawesome, realizes that fontawesome is already installed, then looks for FontAwesome again, and can't find it still, so it stops. I'm not sure if this is a tinytex error or a problem with vitae or fontspec.

tlmgr search --file --global '/FontAwesome[.](tfm|afm|mf|otf)'
Trying to automatically install missing LaTeX packages...
tlmgr install fontawesome
tlmgr: package repository http://mirror.las.iastate.edu/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr install: package already present: fontawesome
tlmgr path add
tlmgr search --file --global '/FontAwesome[.](tfm|afm|mf|otf)'
! Package fontspec Error: The font "FontAwesome" cannot be found.

@Aariq That's really odd. Could you provide the full *.log file?

Thanks! What's your output of Sys.which('mktextfm')?

> Sys.which('mktextfm')
                 mktextfm 
"/usr/local/bin/mktextfm" 

Okay. I really need a reproducible example now (as well as xfun::session_info(c('tinytex', 'vitae'))). I have tried several times with my own example above and I just cannot reproduce the issue.

Finally I found you were using the Github version of the vitae package (neither of you showed your session info)... and I was able to reproduce the issue with the Github version.

The CRAN version works fine. So a certain commit since 2019-01-08 must have broken it (might be https://github.com/ropenscilabs/vitae/commit/47799a04fd10e773c5440c4a01078f0464e920d6).

Thank you! @yihui

Will make sure to include session info next time.

Was this page helpful?
0 / 5 - 0 ratings