Build Error "CP: unknown option"

I built my package successfully and then I made an update to the "Description" and "Namespace" files and may have made some project configuration setting changes.

Now, when I try to build, "Build Source" works but "Build Binary" fails. I have no idea how to troubleshoot this error (I am a newb to R and RStudio) but I get the following error. Note, my old package works the way I want it to; I was mainly trying to update the "Description" so I can distribute the files nicely to a colleague. However, the package fails even if I copy the original "Description" and "Namespace" files back into the work folder. The following is the output message (I have no idea what to do with the "Try '/Rtools/bin/cp --help' for more information." message).

==> Rcmd.exe INSTALL --preclean --no-multiarch --with-keep.source quantMod2

  • installing to library 'C:/Users/Lifygen/Documents/R/win-library/3.6'
  • installing binary package 'quantMod2' ...
    cp: unknown option -- )
    Try '/Rtools/bin/cp --help' for more information.
    ERROR: installing binary package failed
  • removing 'C:/Users/Lifygen/Documents/R/win-library/3.6/quantMod2'
  • restoring previous 'C:/Users/Lifygen/Documents/R/win-library/3.6/quantMod2'

Exited with status 1.

2 Likes

I'd recommend re-installing Rtools to see if that fixes it.

And if that doesn't fix it, please run the following and copy-paste the results:

devtools::find_rtools(debug = TRUE)

Here are some related posts:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.