jsonlite for R gives error when trying to install
Asked Answered
T

1

7

Where does one get jsonlite? Apparently it is missing from CRAN?

> install.packages('jsonlite')

Gives:

Installing package into ‘C:/Users/cbusch/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/jsonlite_0.9.20.zip'
Warning in install.packages :
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/jsonlite_0.9.20.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.2/jsonlite_0.9.20.zip'
Warning in install.packages :
  download of package ‘jsonlite’ failed

Any suggestions?

Task answered 8/6, 2016 at 16:0 Comment(2)
try this ....install.packages('jsonlite', dependencies=TRUE, repos='http://cran.rstudio.com/')Colp
I found this was the case for failure when trying to use RMarkdown in RStudio ("upgrade rmarkdown") for the first time. Installing jsonlite manually resolved these issues.Heliport
M
14

Like @user5249203 said:

install.packages('jsonlite', dependencies=TRUE, repos='http://cran.rstudio.com/')

Moonscape answered 24/8, 2016 at 10:7 Comment(3)
Why does this work? How is this different from install.pacakges('jsonlite')?Pomcroy
@avh Possibly because repos uses http instead of https.Moonscape
Don't use this. It just forcibly installs the dependencies and will overwrite your currently installed libraries without asking, and then still throws the same compiler error.Antifebrile

© 2022 - 2024 — McMap. All rights reserved.