I have a .Rnw file. I usually can "Compile" it into a PDF file in RStudio. However, I recently upgraded my R Version to 3.2.0. Now, when I try to "Compile" my .Rnw file I get an error:

/Library/Frameworks/R.framework/Resources/bin/R: line 261: exec: /Library/Frameworks/R.framework/Resources/bin/exec/x86_64/R: cannot execute: No such file or directory

When I go to this directory:


I see one file called "RScript". And when I go to this directory:


I do see a file called "R".

[1] "x86_64-apple-darwin13.4.0"

[1] "x86_64"

[1] "darwin13.4.0"

[1] "x86_64, darwin13.4.0"

[1] ""

[1] "3"

[1] "2.0"

[1] "2015"

[1] "04"

[1] "16"

$`svn rev`
[1] "68180"

[1] "R"

[1] "R version 3.2.0 (2015-04-16)"

[1] "Full of Ingredients"

One other strange thing is that I do not have a line 261 in the .Rnw file I tried to compile. However, another .Rnw file open has 261 lines and its last line is is \end{document}.

Any help would be much appreciated! You cannot say anything too basic for me; I am very inexperienced in working with these files and installation problems in general (if that is even what this is!)

If there is any other information I should provide, please let me know. I do not know how to determine what information is necessary for this. I really need some pointers, and would be so grateful to hear any advice to solve this. Thank you!

EDIT: I reinstalled the older version of R (3.1.2), and the code now works. So, I am using the older version in the meantime. I am wondering if anyone else has this issue at some point!?

  • Any news here? Is the problem solved with version 3.5? – Bobyandbob May 16 '18 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.