installing rmarkdown packages gives me non-zero exit status - r-markdown

I am completely new to RStudio. Hence I apologize in advance for my inexpertise.
the response to install.packages("rmarkdown") the first code below.
Then, when I try to go to New file Rmarkdown it appears the alert: "Creating R Markdown documents requires an updated version of the rmarkdown package. Do you want to install this package now?"
When I accept I get the second code below.
What can I do to solve the problem? You help a total beginner please? Thank you for your patience. I am using RStudio 1.3.1093 on OS Sierra 10.12.6
'''
There is a binary version available but the source version is later:
binary source needs_compilation
rmarkdown 2.3 2.5 FALSE
installing the source package ‘rmarkdown’
provo con l'URL 'https://cran.rstudio.com/src/contrib/rmarkdown_2.5.tar.gz'
Content type 'application/x-gzip' length 3203415 bytes (3.1 MB)
==================================================
downloaded 3.1 MB
Warning in file(con, "r") :
cannot open file '/var/db/timezone/zoneinfo/+VERSION': No such file or directory
dyld: lazy symbol binding failed: Symbol not found: _utimensat
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _utimensat
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
/Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34: 51734 Done echo 'tools:::.install_packages()'
51735 Abort trap: 6 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --no-echo --args ${args}
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/_3/fpj05lzj5zj03typ4t6k3wlh0000gn/T/RtmpMVE5wW/downloaded_packages’
Installing 'rmarkdown' for R Markdown...
There is a binary version available but the source version is later:
binary source needs_compilation
rmarkdown 2.3 2.5 FALSE
installing the source package ‘rmarkdown’
provo con l'URL 'https://cran.rstudio.com/src/contrib/rmarkdown_2.5.tar.gz'
Content type 'application/x-gzip' length 3203415 bytes (3.1 MB)
==================================================
downloaded 3.1 MB
Warning in file(con, "r") :
cannot open file '/var/db/timezone/zoneinfo/+VERSION': No such file or directory
dyld: lazy symbol binding failed: Symbol not found: _utimensat
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _utimensat
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
/Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34: 51767 Done echo 'tools:::.install_packages()'
51768 Abort trap: 6 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --no-echo --args ${args}
The downloaded source packages are in
‘/private/var/folders/_3/fpj05lzj5zj03typ4t6k3wlh0000gn/T/RtmpDhf44F/downloaded_packages’
✔ Package 'rmarkdown' successfully installed.
Warning message:
In utils::install.packages("rmarkdown", repos = "https://cran.rstudio.com/") :
installation of package ‘rmarkdown’ had non-zero exit status

Try install.packages(“rmarkdown”, dep = TRUE) . I also see something about the time zone, is your PC on the right time? I’ve seen installs not work because of the pc had the wrong time. You will also need to install latex with Rmarkdown

Related

Error while knitting Rmarkdown with reticulate: OSError: libomp.dylib not found

I'm trying to knit an Rmarkdown with reticulate for a chunk of python code.
Knitting throws out an error saying libomp.dylib not found, but the code runs fine as a chunk (not knitted).
Machine: Macbook M1 Max
OS: Ventura 13.0.1
I used below packages for python with reticulate.
library(reticulate)
use_python("/Users/ramanujam/opt/anaconda3/bin/python")
from lazypredict.Supervised import LazyClassifier
from sklearn.model_selection import train_test_split
I'm Getting the error below.
However, code executes fine as a chunk.
Error in py_call_impl(callable, dots$args, dots$keywords) :
OSError: dlopen(/Users/xxx/opt/anaconda3/lib/python3.9/site-packages/lightgbm/lib_lightgbm.so, 0x0006): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
Referenced from: <8DF2AF67-B85F-3F67-B687-E50A514307EC> /Users/xxx/opt/anaconda3/lib/python3.9/site-packages/lightgbm/lib_lightgbm.so
Reason: tried: '/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libomp.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/server/libomp.dylib' (no such file)
I underestand this is a dependency on libomp.
I already tried installing libomp with
brew install libomp
Tried creating a symlink to R.framework path from the brew install location but there is a conflict of architecture there.
Since the code executes in chunk but has trouble during knitting, I'm guessing the libomp source used is different there. But I'm not clear on how or why Rstudio would have a different source while running in chunks vs. knitting as I have specified the python path to be used.
Any help would be appreciated. Thanks in advance!

dyld: Library not loaded: /usr/local/opt/gsl/lib/libgsl.23.dylib

I am trying to get a piece of software called emergent working. It relies on qt and coin, which I've both installed.
But when I try to run emergent, I get the following error:
dyld: Library not loaded: /usr/local/opt/gsl/lib/libgsl.23.dylib
Referenced from: /usr/local/bin/emergent
Reason: image not found
Abort trap: 6
gsl 2.6 is already installed on my computer. Also using Mac OS. Any ideas what could be causing this?
ls /usr/local/opt/gsl
see which version of the library you have (I had .25)
then
ln -s libgsl.25.dylib libgsl.23.dylib
Makes symbolic link between files.
then it worked!

sjPlot installation and rlang error in R

I've spent all day trying to install sjPlot and I've been searching the forum + other forums but can't seem to find a solution to my problem. Essentially, when I try to install the sjPlot package, I get the following output:
> install.packages("sjPlot", dependencies = TRUE)
Installing package into ‘C:/Users/mmarttin/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependencies ‘VGAM’, ‘pbkrtest’ are not available
also installing the dependencies ‘bindrcpp’, ‘glue’, ‘purrr’, ‘bayesplot’, ‘pillar’, ‘dplyr’, ‘ggeffects’, ‘rlang’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’, ‘tidyselect’, ‘tibble’, ‘tidyr’, ‘AICcmodavg’, ‘car’
> There are binary versions available but the source versions are later:
binary source needs_compilation
bindrcpp 0.1 0.2 TRUE
glue 1.0.0 1.2.0 TRUE
purrr 0.2.2 0.2.4 TRUE
bayesplot 1.2.0 1.4.0 FALSE
dplyr 0.5.0 0.7.4 TRUE
sjmisc 2.4.0 2.6.3 FALSE
sjstats 0.10.0 0.14.0 FALSE
tibble 1.3.0 1.4.2 TRUE
tidyr 0.6.1 0.7.2 TRUE
AICcmodavg 2.1-0 2.1-1 FALSE
car 2.1-4 2.1-6 FALSE
sjPlot 2.3.1 2.4.0 FALSE
> Binaries will be installed
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘rlang’
‘tidyselect’
These will not be installed
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/bindrcpp_0.1.zip'
Content type 'application/zip' length 567177 bytes (553 KB)
downloaded 553 KB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/glue_1.0.0.zip'
Content type 'application/zip' length 34947 bytes (34 KB)
downloaded 34 KB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/purrr_0.2.2.zip'
Content type 'application/zip' length 807672 bytes (788 KB)
downloaded 788 KB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/dplyr_0.5.0.zip'
Content type 'application/zip' length 2520396 bytes (2.4 MB)
downloaded 2.4 MB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/tibble_1.3.0.zip'
Content type 'application/zip' length 566754 bytes (553 KB)
downloaded 553 KB
> trying URL '...cran.rstudio.com/bin/windows/contrib/3.2/tidyr_0.6.1.zip'
Content type 'application/zip' length 802821 bytes (784 KB)
downloaded 784 KB
>package ‘bindrcpp’ successfully unpacked and MD5 sums checked
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘purrr’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
package ‘tidyr’ successfully unpacked and MD5 sums checked
> The downloaded binary packages are in
C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X\downloaded_packages
> installing the source packages ‘bayesplot’, ‘pillar’, ‘ggeffects’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’, ‘AICcmodavg’, ‘car’, ‘sjPlot’
> trying URL '...cran.rstudio.com/src/contrib/bayesplot_1.4.0.tar.gz'
> Content type 'application/x-gzip' length 4736155 bytes (4.5 MB)
downloaded 4.5 MB
> trying URL '...cran.rstudio.com/src/contrib/pillar_1.1.0.tar.gz'
> Content type 'application/x-gzip' length 71173 bytes (69 KB)
downloaded 69 KB
> trying URL '...cran.rstudio.com/src/contrib/ggeffects_0.3.1.tar.gz'
> Content type 'application/x-gzip' length 215735 bytes (210 KB)
downloaded 210 KB
> trying URL '...cran.rstudio.com/src/contrib/sjlabelled_1.0.6.tar.gz'
> Content type 'application/x-gzip' length 132974 bytes (129 KB)
downloaded 129 KB
> trying URL '...cran.rstudio.com/src/contrib/sjmisc_2.6.3.tar.gz'
> Content type 'application/x-gzip' length 171577 bytes (167 KB)
downloaded 167 KB
> trying URL '...cran.rstudio.com/src/contrib/sjstats_0.14.0.tar.gz'
> Content type 'application/x-gzip' length 258648 bytes (252 KB)
downloaded 252 KB
> trying URL '...cran.rstudio.com/src/contrib/AICcmodavg_2.1-1.tar.gz'
> Content type 'application/x-gzip' length 250768 bytes (244 KB)
downloaded 244 KB
> trying URL '...cran.rstudio.com/src/contrib/car_2.1-6.tar.gz'
> Content type 'application/x-gzip' length 627349 bytes (612 KB)
downloaded 612 KB
> trying URL '...cran.rstudio.com/src/contrib/sjPlot_2.4.0.tar.gz'
> Content type 'application/x-gzip' length 917066 bytes (895 KB)
downloaded 895 KB
> ERROR: dependency 'rlang' is not available for package 'bayesplot'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/bayesplot'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/bayesplot_1.4.0.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘bayesplot’ had non-zero exit status
> ERROR: dependency 'rlang' is not available for package 'pillar'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/pillar'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/pillar_1.1.0.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
> ERROR: dependency 'rlang' is not available for package 'sjlabelled'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/sjlabelled'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/sjlabelled_1.0.6.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘sjlabelled’ had non-zero exit status
> ERROR: dependency 'VGAM' is not available for package 'AICcmodavg'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/AICcmodavg'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/AICcmodavg_2.1-1.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘AICcmodavg’ had non-zero exit status
> ERROR: dependency 'pbkrtest' is not available for package 'car'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/car'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/car_2.1-6.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘car’ had non-zero exit status
> ERROR: dependencies 'rlang', 'sjlabelled', 'tidyselect' are not available for package 'sjmisc'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/sjmisc'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/sjmisc_2.6.3.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘sjmisc’ had non-zero exit status
> ERROR: dependencies 'bayesplot', 'rlang', 'sjlabelled', 'sjmisc', 'tidyselect' are not available for package 'sjstats'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/sjstats'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/sjstats_0.14.0.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘sjstats’ had non-zero exit status
ERROR: dependencies 'rlang', 'sjlabelled', 'sjmisc', 'sjstats', 'tidyselect' are not available for package 'ggeffects'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/ggeffects'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/ggeffects_0.3.1.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘ggeffects’ had non-zero exit status
ERROR: dependencies 'ggeffects', 'rlang', 'sjlabelled', 'sjmisc', 'sjstats', 'tidyselect' are not available for package 'sjPlot'
* removing 'C:/Users/mmarttin/Documents/R/win-library/3.2/sjPlot'
> Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\mmarttin\Documents\R\win-library\3.2" C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X/downloaded_packages/sjPlot_2.4.0.tar.gz' had status 1
> Warning in install.packages :
installation of package ‘sjPlot’ had non-zero exit status
> The downloaded source packages are in
‘C:\Users\mmarttin\AppData\Local\Temp\RtmpKQqs8X\downloaded_packages’
I've tried installing VGAM and pbkrtest, along with rlang and tidyselect, but it just says the following:
> Warning in install.packages :
packages ‘VGAM’, ‘pbkrtest’ are not available (for R version 3.2.1)
> Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘rlang’
These will not be installed
> Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘rlang’
‘tidyselect’
These will not be installed
From what I can understand, the most central package seems to be rlang. So I read in some thread that perhaps I could download RTools to my computer and try to download rlang again, but I can't seem to open Rtools in R (or however it works; I tried to follow a guide on https://github.com/stan-dev/rstan/wiki/Install-Rtools-for-Windows but I couldn't make it work).
I also tried to download the .zip file and open the package in R; however, that only lead to error when I tried again to install sjPlot (something along the lines of "the procedure entry point could not be located in the dynamic link library...", referent to the rlang package).
As I'm sure you can tell, I'm quite lost and would really appreciate any kind of help in resolving this issue! Not sure what kind of info you need from me, but I'm running on a Windows 8.1, RStudio latest version available on their website (RStudio Desktop 1.1.419).
I've also tried re-installing RStudio, looked for updates, etc.
You are using an older release of R (version 3.2), and for some packages, binaries may not be built for that R version yet. However, rlang and tidyselect seem to be available as windows binaries for R 3.2.
If possible, I would recommend to update R to the latest release (3.4.x) and then install RTools (https://cran.r-project.org/bin/windows/Rtools/), which simply needs to be executed (it installs a C++-compiler and modifies your PATH variable, so R will find the C++-compiler if needed).
Maybe this already solves your problem?
Another option might be to install other packages with dependencies first, e.g. tidyr, dplyr, rlang, tibble, purrr, ... (the tidyverse packages), and then install the next packages. So, don't install all packages in one call to install.packages(), but in multiple steps.
if you are using conda env than you should try this command after active your
conda enviroment conda install -c conda-forge r-sjplot
for more info

graph-tool crahes on import

Using Python 2.7 I try to import graph-tool:
from graph_tool.all import *
Each time I execute the above command the following error is returned and Python crashes.
dyld: lazy symbol binding failed: Symbol not found:
__ZN5boost6python6detail11init_moduleEPKcPFvvE Referenced from: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so
Expected in: flat namespace
dyld: Symbol not found: __ZN5boost6python6detail11init_moduleEPKcPFvvE
Referenced from:
/usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so
Expected in: flat namespace
Trace/BPT trap: 5
I installed graph-tool with homebrew on Mac OSX 10.10. Does anybody know how to fix this issue?
There is probably a mismatch between the python version you are using,
and the one used to compile boost::python and graph-tool.
For example, you might be using the system's python, whereas
graph-tool/python were compiled with a version installed via homebrew.
Python modules have been installed but the site-packages may not be
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run like this:
mkdir -p /Users/myname/Library/Python/2.7/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/myname/Library/Python/2.7/lib/python/site-packages/homebrew.pth
In my case it's the homebrew site-packages, but may not yours

ERROR: failed to lock directory 'C:/Program Files/R/R-3.0.2/library' for modifying when installing RStan in Rstudio in Windows 7

I am trying to install RStan according to https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started
I used windows 7, RStudio 0.98.501 and R x64 3.0.2
I installed packages inline and Rcpp successfully.
The result of C++ test as follows:
> src <- '
+ std::vector<std::string> s;
+ s.push_back("hello");
+ s.push_back("world");
+ return Rcpp::wrap(s);
+ '
> hellofun <- cxxfunction(body = src, includes = '', plugin = 'Rcpp', verbose = FALSE)
cygwin warning:
MS-DOS style path detected: C:/PROGRA~1/R/R-30~1.2/etc/x64/Makeconf
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-30~1.2/etc/x64/Makeconf
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
> cat(hellofun(), '\n')
hello world
I thought thhe "hello world" means I installed C++ correctly.
Then I input the following codes:
> Sys.setenv(R_MAKEVARS_USER = "foobar")
> options(repos = c(getOption("repos"), rstan = "http://wiki.rstan-repo.googlecode.com/git/"))
> install.packages('rstan', type = 'source')
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
unable to access index for repository http://wiki.rstan-repo.googlecode.com/git/bin/windows/contrib/3.0
trying URL 'http://wiki.rstan-repo.googlecode.com/git/src/contrib/rstan_2.2.0.tar.gz'
Content type 'application/x-gzip' length 4515994 bytes (4.3 Mb)
opened URL
downloaded 4.3 Mb
ERROR: failed to lock directory 'C:/Program Files/R/R-3.0.2/library' for modifying
Try removing 'C:/Program Files/R/R-3.0.2/library/00LOCK-rstan'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-30~1.2/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.0.2\library" C:\Users \BYNBUT~1\AppData\Local\Temp\Rtmp4WmSTV/downloaded_packages/rstan_2.2.0.tar.gz' had status 3
Warning in install.packages :
installation of package ‘rstan’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\byny\AppData\Local\Temp\Rtmp4WmSTV\downloaded_packages’
Then,
> library(rstan)
Error in library(rstan) : there is no package called ‘rstan’
RStan installed unsuccessfully.
I have no idea how to solve the issue.
Updates: I uninstalled the all the versions of R and installed the latest version 64 bits R. Then I installed RStan again. The problem solved.
I had the same problem. Everything worked fine until the "hello world" of the C++ installation check. Then, I ran the suggested lines:
options(repos = c(getOption("repos"), rstan = "http://wiki.rstan-repo.googlecode.com/git/"))
install.packages('rstan', type = 'source')
I had plenty of 404 errors. The last lines of the output were:
The downloaded source packages are in
‘C:\Users\U111499\AppData\Local\Temp\RtmpYfj24v\downloaded_packages’
Then I went to the package tab of RStudio, clicked "Install Packages", selected "Install from: Package Archive File", then the "rstan_2.2.0.tar.gz" that I found under the path mentionned above. That finally seemed to do the trick. Good luck !
This works for me:
install.packages("rstan", repos = "https://cran.r-project.org", dependencies = TRUE)
See here: https://github.com/stan-dev/rstan/issues/304