Skip to content
Prev 11039 / 15075 Next

“pdflatex is not available” from “R CMD check”

On Jan 26, 2015, at 6:20 PM, Spencer Graves <spencer.graves at prodsyse.com> wrote:
Spencer,

First question would be, have you installed MacTex, which includes all the required components?

If not, then visit:

  https://tug.org/mactex/

MacTex 2014 is the current version. There are also some Yosemite specific notes here:

  http://www.tug.org/mactex/yosemite.html

The package should modify your $PATH upon installation, so that it includes:

  /usr/texbin

and Sys.which("pdflatex") in the R console run from the OS X terminal should return:
pdflatex 
"/usr/texbin/pdflatex" 


I would check:

  $PATH

and:

  which pdflatex

from the OS X terminal (not in an R session), just to be sure that you don't get different results there, as compared to what you are getting in R. In theory, the OS X terminal should provide the definitive response, whereas running some applications/GUI's, may not pick up (inherit) the system path.

You can also check:

  ls /usr/texbin

which contains links to the actual installation in:

  ls /usr/local/texlive/2014/bin/x86_64-darwin

to see if MacTex 2014 has been installed (it should show a large number of files and links, including pdflatex). If you have a prior version, then the path would be:

  ls /usr/local/texlive/YYYY/...


Regards,

Marc Schwartz