I'm having the same issue as #885 which was closed but does not appear to have been solved (and is still affecting other users, e.g. the most recent comment on #885 from Sep 2017).
> devtools::install_github("tidyverse/ggplot2")
Downloading GitHub repo tidyverse/ggplot2@master
from URL https://api.github.com/repos/tidyverse/ggplot2/zipball/master
Installing ggplot2
Downloading GitHub repo hadley/scales@master
from URL https://api.github.com/repos/hadley/scales/zipball/master
Error: running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD config CC' had status 127
One of my collaborators had the same problem. It also appears to have come up for find_rtools().
See below an extract from an email
regards
Desmond
On the first computer, everything was fine until devtools::install_github("DesmondCampbell/diseaseRiskPredictor")
• The person originally has a very old version of R installed, so I installed the newest version (3.4.2) and all the following is done under R 3.4.2.
• The PC has no C++ installed. So indeed Rtools is required for evalCpp() to work.
• The newest Rtools is installed.
• devtools and Rcpp could be successfully installed and loaded.
• evalCpp() works properly.
• find_rtools() does not work.
• devtools::install_github() does not work.
devtools::install_github("DesmondCampbell/diseaseRiskPredictor")
Downloading GitHub repo DesmondCampbell/diseaseRiskPredictor@master
from URL https://api.github.com/repos/DesmondCampbell/diseaseRiskPredictor/zipball/master
Error: running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD config CC' had status 127
find_rtools has a similar error.
I had this same issue and was able to fix it. In my case, I had Rtools installed but also another compiler (mingw64 as packaged with AD Model Builder). This other one was first in my environmental PATH. I simply put the Rtools binaries directory at the top of my path and it worked fine after restarting R.
Windows 10, R 3.3.3, Rtools 3.3.0.1959.
A modified version of @colemonnahan's solution worked for me: I reinstalled Rtools and during installation, on the "Select Additional Tasks" dialog box I checked "Edit the system PATH. ...". Then on the next screen of the dialog box it confirmed "Edit the PATH (leaving Rtoolsbin first)" which means the Rtools directory was now at the top of my path. Then I re-ran
install.packages("devtools")
devtools::install_github("tidyverse/ggplot2")
and got the Github version with no error.
It is important to note that installing RTools via RStudio does not give you the "Select Additional Tasks" to edit system PATH, so it is necessary to install RTools from their website here. Thanks for finally finding the solution to install_github has status 127 for me!
@ThisIsJeron we strongly recommend against modifying the system path
@hadley I see, I was just following @skhiggins's suggestion. Even though his solution solved my problem, do you know of an method to solving status 127 error without editing system path?
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
Most helpful comment
A modified version of @colemonnahan's solution worked for me: I reinstalled Rtools and during installation, on the "Select Additional Tasks" dialog box I checked "Edit the system PATH. ...". Then on the next screen of the dialog box it confirmed "Edit the PATH (leaving Rtoolsbin first)" which means the Rtools directory was now at the top of my path. Then I re-ran
and got the Github version with no error.