Reconfiguring RStudio after upgrade to OS X El Capitan - knitr and Markdown doesn't work

215 views
Skip to first unread message

Joanna Zyprych-Walczak

unread,
Feb 17, 2016, 3:59:35 AM2/17/16
to knitr
Hallo everyone,
after updating to Mac OS X 10.11 El Capitan when I try to compile .Rnw file in RStudio, I receive a message "Unabled to find specified LaTeX program 'pdfLaTeX' on the system path".  As pointed out by Herbert Schulzunder OS X 10.11, El Capitan, writing to /usr is no longer allowed, even with Administrator privileges. The usual symbolic link to the active TEX Distribution, /usr/texbin, is therefore removed (if it was there from a previous OS version) and cannot be installed. RStudio have the path to those binaries set to /usr/texbin by default and will no longer find the binaries there.
When it turned out that it was a problem with  having a wrong path to the Tex installation I was able to fix it by adding a path to the latex binaries using:
Sys.setenv(PATH=paste(Sys.getenv("PATH"),"/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin",sep=":")). That  fixed the problem and now the build function can turn the .Rnw files into PDF documents in Studio but after closing RStudio I have to change this path again. Maybe anyone knows how to change this path permanently?
I will be very grateful for any help.
Best, Joanna


Yihui Xie

unread,
Feb 17, 2016, 11:10:49 AM2/17/16
to Joanna Zyprych-Walczak, knitr
I believe it should just work if you reinstall MacTeX and upgrade
RStudio to the latest version.

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Web: http://yihui.name

Lalas

unread,
Feb 18, 2016, 1:19:23 PM2/18/16
to knitr
I had a similar issue. See the following SO link

I resolved my issue by using the following command:

ln -s /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin /Library/TeX/texbin
Reply all
Reply to author
Forward
0 new messages