Cannot install devtools for R version 3.6.1

Hello, I am trying to install devtools in my pc but no luck on this.

Here is what the shell shows:

Installing package into ‘C:/.../Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘C:/.../AppData/Local/Temp/Rtmp4eiV42/downloaded_packages’ is not available (for R version 3.6.1)

Rtools is already installed.

Would you help me, please?

Hi Maby, welcome!

Do you have any particular reason for trying to use that folder path? usually you would install devtools with


If for some reason, you want to install from a file you would have to specify the file path not the folder path and use this arguments.

install.packages(path_to_file, repos = NULL, type="source")

Hello, andresrcs

install.packages('C:/Users/Sherwood/AppData/Local/Temp/RtmpkTfn52/downloaded_packages/devtools', repos = NULL, type="source")
Installing package into ‘C:/Users/Sherwood/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *binary* package 'devtools' ...
cp: unknown option -- )
Try '/Rtools/bin/cp --help' for more information.
ERROR: installing binary package failed
* removing 'C:/Users/Sherwood/Documents/R/win-library/3.6/devtools'
* restoring previous 'C:/Users/Sherwood/Documents/R/win-library/3.6/devtools'
Warning in install.packages :
  installation of package ‘C:/Users/Sherwood/AppData/Local/Temp/RtmpkTfn52/downloaded_packages/devtools’ had non-zero exit status

So it means it is not successful, isn't it?

Though it appears as a package in my computer
forRcommunity1 !
and show the imports:

devtools     "callr, cli, covr (>= 3.2.0), crayon, desc, digest, DT,\nellipsis (>= 0.3.0), glue, git2r (>= 0.23.0), httr (>= 0.4),\njsonlite, memoise (>= 1.0.0), pkgbuild (>= 1.0.3), pkgload (>=\n1.0.2), rcmdcheck (>= 1.3.3), remotes (>= 2.1.0), rlang,\nroxygen2 (>= 6.1.1), rstudioapi (>= 0.7), rversions,\nsessioninfo (>= 1.1.1), stats, testthat (>= 2.1.1), tools,\nutils, withr"

and the suggests as well:

devtools     "BiocManager, bitops, curl (>= 0.9), evaluate, foghorn (>=\n1.1.0), gmailr (> 0.7.0), knitr, lintr (>= 0.2.1), mockery,\npingr, MASS, pkgdown, Rcpp (>= 0.10.0), rhub (>= 1.0.2),\nrmarkdown, spelling (>= 1.1), whisker"  

i try seeing in the library but prompts this message:

Loading required package: usethis
Error: package or namespace load failed for ‘usethis’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘Rcpp’
Error: package ‘usethis’ could not be loaded

Again, you are trying to use a folder path not a file path, could you explain why are you trying to use the path to a temp folder? If you are trying to install off-line you have to use the package source file (.tar.gz) or the windows binaries (.zip). also, if you are trying to install a binary file then remove the type="source" argument.

You are missing the Rcpp package dependency, try installing it

install.packages("Rcpp", dependencies = TRUE)
1 Like

Thanks a lot, andresrcs

problem solved.

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