1

Problem: I was trying to install the papaja package

devtools::install_github("crsh/papaja")

I received this error:

Error: Failed to install 'reprex' from GitHub:
  System command 'Rcmd.exe' failed, exit status: -1, stdout + stderr empty

To potentially resolve this error, I tried to update R and this came up:

Warning message:
In shell(install_cmd, wait = wait, ...) :
  'C:\Users\naomi\AppData\Local\Temp\RtmpyQPZSR/R-4.0.3-win.exe' execution failed with error code 127

The first error is my main issue which I am trying to resolve. I would appreciate your help with diagnosing both.

This is my current R version: R version 4.0.2 (2020-06-22)

zx8754
  • 52,746
  • 12
  • 114
  • 209
n.baes
  • 19
  • 3

1 Answers1

0

There are several potential issues and it isn't completely clear to me what the issue is just judging from the error code. Here's what I'd try to do:

  1. Check your installation of Rtools and if it is the right version for R 4.0.2
  2. Check if devtools is updated/reinstalled after upgrading to R 4.0.2 (potentially from 3.x.x)
  3. Try installing R 4.0.3 using admin rights, then it should work.
  4. If you still can't install using devtools, try to download the package as .tar.gz and install from the local file.

I hope this helps. I will check if my suggestions helped you out.

tester
  • 1,662
  • 1
  • 10
  • 16
  • Thanks for your response. 1. I re-installed Rtools however it seems to be for Version 4.0.3 and when I went to run the code I encountered the same problem again. 3. I tried to update R b ut am still running into the error code 127. 4. I'm not sure how to download the package as .tar.gz but I downloaded the .zip file from github. – n.baes Oct 23 '20 at 12:09
  • So, what you can do is to unzip the downloaded file, open the "papaja.Rproj" in RStudio and try to run "Install and restart" which you can find in the "build" ribbon on the top right. You might have to install/update a few packages before that, which are required by papaja. When checking the package, there are still some errors, but I managed to install it the way I just described it here. It seems like the package is not really ready for CRAN. – tester Oct 23 '20 at 20:40
  • Hi @tester, I as getting the same errors even when opening the Rproj and running code from readme script. So, I did a complete reinstall of R and R Studio and am receiving the same errors as in the first comment of this post. Would you have any suggestions from here? – n.baes Oct 24 '20 at 06:17
  • Try to build the package locally, install all dependencies and then install it from source. Just opening the Rproj is not enough, you'll have to use 'build and install' in RStudio. – tester Nov 04 '20 at 23:54