# Compiling .Rnw file into PDF in RStudio (Error: No file or directory)

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:

/Library/Frameworks/R.framework/Resources/bin/exec/x86_64


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

/Library/Frameworks/R.framework/Resources/bin/


I do see a file called "R".

$platform [1] "x86_64-apple-darwin13.4.0"$arch
[1] "x86_64"

$os [1] "darwin13.4.0"$system
[1] "x86_64, darwin13.4.0"

$status [1] ""$major
[1] "3"

$minor [1] "2.0"$year
[1] "2015"

$month [1] "04"$day
[1] "16"

$svn rev [1] "68180"$language
[1] "R"

$version.string [1] "R version 3.2.0 (2015-04-16)"$nickname
[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