7

The knitr package can not be found (OSX Mavericks)

 2 years ago
source link: https://www.codesd.com/item/the-knitr-package-can-not-be-found-osx-mavericks.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

The knitr package can not be found (OSX Mavericks)

advertisements

I have attempted to install knitr using RStudio. When I do so, this is what I get

 > install.packages("knitr")
also installing the dependency ‘evaluate’

trying URL 'http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/evaluate_0.5.5.tgz'
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
  cannot open URL 'http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/evaluate_0.5.5.tgz'
Warning in install.packages :
  download of package ‘evaluate’ failed
trying URL 'http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/knitr_1.5.tgz'
Content type 'application/x-gzip' length 863862 bytes (843 Kb)
opened URL
==================================================
downloaded 843 Kb

The downloaded binary packages are in
    /var/folders/ym/flmt1pms5vj_wdhtsmwy63pm0000gn/T//RtmpWM2Yqc/downloaded_packages
> library("knitr", lib.loc="/Library/Frameworks/R.framework/Versions/3.1/Resources/library")
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
  there is no package called ‘evaluate’
Error: package or namespace load failed for ‘knitr’

As a result, knitr does not work at all, even on the little test file provided. When I search the CRAN repository for OSX/Mavericks, I am not finding the evaluate package.

Am I doing something wrong; is there a workaround?


I cannot reproduce it. I can see the knitr package under http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/

Alternatively you can install from source:

install.packages('evaluate', type = 'source')


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK