R markdown and R Notebook won't work

* installing *source* package 'highr' ... 
** package 'highr' successfully unpacked and MD5 sums checked 
** R 
** inst 
** preparing package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** installing vignettes 
** testing if installed package can be loaded 
*** arch - i386 
*** arch - x64 
* DONE (highr) 
* installing *source* package 'digest' ... 
** package 'digest' successfully unpacked and MD5 sums checked 
** libs

*** arch - i386 
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="digest.dll" OBJECTS="aes.o crc32.o digest.o init.o md5.o pmurhash.o raes.o sha1.o sha2.o sha256.o xxhash.o"' had status 127 
ERROR: compilation failed for package 'digest' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/digest' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/digest_0.6.17.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘digest’ had non-zero exit status 
* installing *source* package 'Rcpp' ... 
** package 'Rcpp' successfully unpacked and MD5 sums checked 
** libs

*** arch - i386 
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-32~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="Rcpp.dll" OBJECTS="Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o"' had status 127 
ERROR: compilation failed for package 'Rcpp' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/Rcpp' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/Rcpp_0.12.18.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘Rcpp’ had non-zero exit status 
* installing *source* package 'backports' ... 
** package 'backports' successfully unpacked and MD5 sums checked 
** libs

*** arch - i386 
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="backports.dll" OBJECTS="dotsElt.o dotsLength.o init.o"' had status 127 
ERROR: compilation failed for package 'backports' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/backports' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/backports_1.1.2.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘backports’ had non-zero exit status 
* installing *source* package 'xfun' ... 
** package 'xfun' successfully unpacked and MD5 sums checked 
** R 
** inst 
** preparing package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** installing vignettes 
** testing if installed package can be loaded 
*** arch - i386 
*** arch - x64 
* DONE (xfun) 
* installing *source* package 'glue' ... 
** package 'glue' successfully unpacked and MD5 sums checked 
** libs

*** arch - i386 
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="glue.dll" OBJECTS="glue.o init.o trim.o"' had status 127 
ERROR: compilation failed for package 'glue' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/glue' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/glue_1.3.0.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘glue’ had non-zero exit status 
* installing *source* package 'magrittr' ... 
** package 'magrittr' successfully unpacked and MD5 sums checked 
** R 
** inst 
** byte-compile and prepare package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** installing vignettes 
** testing if installed package can be loaded 
*** arch - i386 
*** arch - x64 
* DONE (magrittr) 
* installing *source* package 'stringi' ... 
** package 'stringi' successfully unpacked and MD5 sums checked 
Warning: running command 'sh ./configure.win' had status 127 
ERROR: configuration failed for package 'stringi' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/stringi' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/stringi_1.2.4.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘stringi’ had non-zero exit status 
* installing *source* package 'yaml' ... 
** package 'yaml' successfully unpacked and MD5 sums checked 
** libs

*** arch - i386 
Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-32~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="yaml.dll" OBJECTS="api.o dumper.o emitter.o implicit.o loader.o parser.o r_emit.o r_ext.o r_parse.o reader.o scanner.o writer.o"' had status 127 
ERROR: compilation failed for package 'yaml' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/yaml' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/yaml_2.2.0.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘yaml’ had non-zero exit status 
* installing *source* package 'base64enc' ... 
** package 'base64enc' successfully unpacked and MD5 sums checked 
** libs

*** arch - i386 
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="base64enc.dll" OBJECTS="base64.o uriencode.o utf8.o"' had status 127 
ERROR: compilation failed for package 'base64enc' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/base64enc' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/base64enc_0.1-3.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘base64enc’ had non-zero exit status 
* installing *source* package 'jsonlite' ... 
** package 'jsonlite' successfully unpacked and MD5 sums checked 
** libs

*** arch - i386 
Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-32~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="jsonlite.dll" OBJECTS="base64.o collapse_array.o collapse_object.o collapse_pretty.o escape_chars.o integer64_to_na.o is_datelist.o is_recordlist.o is_scalarlist.o modp_numtoa.o null_to_na.o num_to_char.o parse.o prettify.o push_parser.o r-base64.o register.o row_collapse.o transpose_list.o validate.o"' had status 127 
ERROR: compilation failed for package 'jsonlite' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/jsonlite' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/jsonlite_1.5.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘jsonlite’ had non-zero exit status 
* installing *source* package 'mime' ... 
** package 'mime' successfully unpacked and MD5 sums checked 
** libs

*** arch - i386 
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB="mime.dll" OBJECTS="rawmatch.o"' had status 127 
ERROR: compilation failed for package 'mime' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/mime' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/mime_0.5.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘mime’ had non-zero exit status 
ERROR: dependency 'mime' is not available for package 'markdown' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/markdown' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/markdown_0.8.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘markdown’ had non-zero exit status 
ERROR: dependencies 'digest', 'Rcpp' are not available for package 'htmltools' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/htmltools' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/htmltools_0.3.6.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘htmltools’ had non-zero exit status 
ERROR: dependency 'backports' is not available for package 'rprojroot' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/rprojroot' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/rprojroot_1.3-2.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘rprojroot’ had non-zero exit status 
* installing *source* package 'tinytex' ... 
** package 'tinytex' successfully unpacked and MD5 sums checked 
** R 
** preparing package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** testing if installed package can be loaded 
*** arch - i386 
*** arch - x64 
* DONE (tinytex) 
ERROR: dependencies 'glue', 'stringi' are not available for package 'stringr' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/stringr' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/stringr_1.3.1.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘stringr’ had non-zero exit status 
ERROR: dependency 'stringr' is not available for package 'evaluate' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/evaluate' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/evaluate_0.11.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘evaluate’ had non-zero exit status 
ERROR: dependencies 'evaluate', 'markdown', 'stringr', 'yaml' are not available for package 'knitr' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/knitr' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/knitr_1.20.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘knitr’ had non-zero exit status 
ERROR: dependencies 'knitr', 'yaml', 'htmltools', 'evaluate', 'base64enc', 'jsonlite', 'rprojroot', 'mime', 'stringr' are not available for package 'rmarkdown' 
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/rmarkdown' 
Warning in install.packages : 
running command '"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A/downloaded_packages/rmarkdown_1.10.tar.gz' had status 1 
Warning in install.packages : 
installation of package ‘rmarkdown’ had non-zero exit status

The downloaded source packages are in 
‘C:\Users\Luke\AppData\Local\Temp\Rtmpe46v8A\downloaded_packages’

Whenever I try to open R Markdown is keeps saying I require the updated versions of the packages: Evaluate, stringr, knitr, rprojroot, rmarkdown.

I've also tried install.packages.

can you include the output of sessionInfo() please.

Is it possible you don't have the toolchain available to compile the code? On windows this would be Rtools.

Also Does this work for you in R, but not in RStudio? (see FAQ below for disambiguation)

1 Like

R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tools_3.2.2

you're running a 3+ year old version of R. Any compelling reason to use something so out of date?

Have you installed an appropriate version of Rtools as mentioned above? RTools: Toolchains for building R and R packages from source on Windows

To follow up on what @jdlong said, I suspect that you are having to compile a lot of packages from source because your version of R is so old. As new package versions are released, pre-compiled binaries are generally made available for the current version of R and sometimes for a very recent past R version, but not for older versions of R. The longer you keep running old R, the more time you’ll need to spend mucking around trying to get your packages to compile.

So if you don’t have a compelling reason to run old R, I would start by upgrading R — it’s likely that there are current binaries available for all these packages, in which case you probably won’t need RTools at all (assuming you keep your R up to date).

3 Likes

Hello jdlong,

I am getting same error,

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base

loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1