R Studio installing stringi fails

user47376 picture user47376 · Nov 19, 2017 · Viewed 7.2k times · Source

I'm trying to invoke knit which tells me that it needs an updated version of rmarkdown which needs the package stringi.

When installing stringi I get the following error:

> install.packages("stringi")

Installing package into ‘C:/Users/matan/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
        binary source needs_compilation
stringi  1.1.5  1.1.6              TRUE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/stringi_1.1.5.zip'
Warning in install.packages :
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/stringi_1.1.5.zip': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/stringi_1.1.5.zip'
Warning in install.packages :
  download of package ‘stringi’ failed

How can I fix this so I can finally knit my .RMD in peace?

Edit (Solution):

  1. Download windows binary (r-release: stringi_1.1.6.zip) from https://cran.r-project.org/web/packages/stringi/index.html
  2. Install by > install.packages(".../Downloads/stringi_1.1.6.zip", repos = NULL, type = "source")

Answer

Glaud picture Glaud · Nov 19, 2017

Simplest solution is download .zip or .tar.gz file from here and install it choosing in RStudio Tool -> Install packages..., change Install from: to Package Archive File and choose your downloaded file.