Last active
December 13, 2018 18:19
-
-
Save kevinushey/e69365828b138d9270f7af94fdbb2932 to your computer and use it in GitHub Desktop.
Rtools not found in expected PATH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sys.setenv(PATH = paste("C:\\RBuildTools\\3.5\\bin;C:\\RBuildTools\\3.5\\mingw_64\\bin", Sys.getenv("PATH"), sep = ";")) | |
file <- tempfile(fileext = ".c") | |
writeLines("void test() {}", con = file) | |
R <- file.path(R.home("bin"), "R") | |
file <- normalizePath(file, winslash = "/") | |
system2(R, c("CMD", "SHLIB", shQuote(file))) | |
# c:/Rtools/mingw_64/bin/gcc -I"C:/R/R-35~1.2BE/include" -DNDEBUG -O2 -Wall -std=gnu99 -mtune=generic -c C:/Users/kevin/AppData/Local/Temp/RtmpK2O0OE/file123830c41969.c -o C:/Users/kevin/AppData/Local/Temp/RtmpK2O0OE/file123830c41969.o | |
# sh: c:/Rtools/mingw_64/bin/gcc: No such file or directory | |
# make: *** [C:/R/R-35~1.2BE/etc/x64/Makeconf:208: C:/Users/kevin/AppData/Local/Temp/RtmpK2O0OE/file123830c41969.o] Error 127 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment