Rcmd check/Rcmd build leads with file not found, leading devtools::check to fail package installation

Viewed 78

The issue:

On one PC, Rcmd check/Rcmd build always lead with The system cannot find the path specified, and has an exit code of 1. They otherwise operate properly. However, this causes devtools::check and remotes::install_local to fail, leaving me unable to install packages from source properly and causes issues with package deployment scripts I'm using.

Even when running Rcmd check --help or Rcmd build --help, before the normal help file, I get the message The system cannot find the path specified and the exit code is 1.

What have I tried:

  • A full reinstall of R.
  • Using a different version of R.
  • Deleting HKCU\Software\R-core and HKLM\Software\R-core from the registry (I've noted that R can run properly without these, they just help RStudio/others help find R).
  • Setting R_LIBS_USER in the system environment, and removing it.

What have I found online:

I know this isn't a usual question, as I can't provide a reproducible example. I'm happy to provide any information requested (don't think version/Sys.info()/sessioninfo() provide help since this occurs with multiple R versions, and without starting R at all by just using Rcmd (but in devtools too of course)). Any suggestions are very much welcome.

1 Answers

I finally figured it out!

An old miniconda install, installed a long time ago through reticulate, somehow got deleted without cleaning up the relevant registry keys.

An incorrect value in the key HKEY_CURRENT_USER\Software\Microsoft\Command Processor\Autorun caused this behavior. It automatically starts scripts whenever cmd.exe starts. It pointed to a deleted conda script.

Deleting this registry key solved the issue.

Related