Error in installing package devtools

The downloaded source packages are in
‘C:\Users\xxxxx\AppData\Local\Temp\RtmpOEX3XI\downloaded_packages’

library(devtools)
Error in library(devtools) : there is no package called ‘devtools’

We need more information to help you out, Can you post the whole message you get when you try to install devtools?

I was getting same error, you should try this:

install.packages("devtools")
require(devtools)
library(devtools)

** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64

  • DONE (BH)
  • installing source package 'ggplot2' ...
    ** package 'ggplot2' successfully unpacked and MD5 sums checked
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** inst
    ** preparing package for lazy loading
    Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
    there is no package called 'pillar'
    ERROR: lazy loading failed for package 'ggplot2'
  • removing 'C:/Users/162825/Documents/R/win-library/3.4/ggplot2'
    Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\162825\Documents\R\win-library\3.4" C:\Users\162825\AppData\Local\Temp\RtmpcXDnjt/downloaded_packages/ggplot2_3.2.1.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘ggplot2’ had non-zero exit status
  • installing source package 'clipr' ...
    ** package 'clipr' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (clipr)
  • installing source package 'whisker' ...
    ** package 'whisker' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (whisker)
  • installing source package 'R6' ...
    ** package 'R6' successfully unpacked and MD5 sums checked
    ** R
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (R6)
  • installing source package 'htmlwidgets' ...
    ** package 'htmlwidgets' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    Failed with error: 'there is no package called 'shiny''
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (htmlwidgets)
  • installing source package 'prettyunits' ...
    ** package 'prettyunits' successfully unpacked and MD5 sums checked
    ** R
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (prettyunits)
  • installing source package 'evaluate' ...
    ** package 'evaluate' successfully unpacked and MD5 sums checked
    ** R
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (evaluate)
  • installing source package 'cli' ...
    ** package 'cli' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (cli)
  • installing source package 'remotes' ...
    ** package 'remotes' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (remotes)
  • installing source package 'rstudioapi' ...
    ** package 'rstudioapi' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (rstudioapi)
  • installing source package 'rversions' ...
    ** package 'rversions' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (rversions)
  • installing source package 'pillar' ...
    ** package 'pillar' successfully unpacked and MD5 sums checked
    ** R
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (pillar)
    ERROR: dependency 'fastmap' is not available for package 'shiny'
  • removing 'C:/Users/162825/Documents/R/win-library/3.4/shiny'
    Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\162825\Documents\R\win-library\3.4" C:\Users\162825\AppData\Local\Temp\RtmpcXDnjt/downloaded_packages/shiny_1.4.0.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘shiny’ had non-zero exit status
    ERROR: dependency 'processx' is not available for package 'callr'
  • removing 'C:/Users/162825/Documents/R/win-library/3.4/callr'
    Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\162825\Documents\R\win-library\3.4" C:\Users\162825\AppData\Local\Temp\RtmpcXDnjt/downloaded_packages/callr_3.4.1.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘callr’ had non-zero exit status
  • installing source package 'DT' ...
    ** package 'DT' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (DT)
  • installing source package 'httr' ...
    ** package 'httr' successfully unpacked and MD5 sums checked
    ** R
    ** demo
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (httr)
  • installing source package 'gh' ...
    ** package 'gh' successfully unpacked and MD5 sums checked
    ** R
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (gh)
    ERROR: dependency 'callr' is not available for package 'pkgbuild'
  • removing 'C:/Users/162825/Documents/R/win-library/3.4/pkgbuild'
    Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\162825\Documents\R\win-library\3.4" C:\Users\162825\AppData\Local\Temp\RtmpcXDnjt/downloaded_packages/pkgbuild_1.0.6.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘pkgbuild’ had non-zero exit status
  • installing source package 'usethis' ...
    ** package 'usethis' successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    namespace 'fs' 1.2.7 is being loaded, but >= 1.3.0 is required
    ERROR: lazy loading failed for package 'usethis'
  • removing 'C:/Users/162825/Documents/R/win-library/3.4/usethis'
    Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\162825\Documents\R\win-library\3.4" C:\Users\162825\AppData\Local\Temp\RtmpcXDnjt/downloaded_packages/usethis_1.5.1.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘usethis’ had non-zero exit status
    ERROR: dependencies 'callr', 'pkgbuild' are not available for package 'rcmdcheck'
  • removing 'C:/Users/162825/Documents/R/win-library/3.4/rcmdcheck'
    Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\162825\Documents\R\win-library\3.4" C:\Users\162825\AppData\Local\Temp\RtmpcXDnjt/downloaded_packages/rcmdcheck_1.3.3.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘rcmdcheck’ had non-zero exit status
    ERROR: dependencies 'usethis', 'callr', 'pkgbuild', 'rcmdcheck' are not available for package 'devtools'
  • removing 'C:/Users/162825/Documents/R/win-library/3.4/devtools'
    Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\162825\Documents\R\win-library\3.4" C:\Users\162825\AppData\Local\Temp\RtmpcXDnjt/downloaded_packages/devtools_2.2.1.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\162825\AppData\Local\Temp\RtmpcXDnjt\downloaded_packages’
Error in readRDS(pfile) :
cannot read workspace version 3 written by R 4.0.0; need R 3.5.0 or newer

library(devtools)
Error in library(devtools) : there is no package called ‘devtools’

You have a lot of outdated packages that are causing installation issues and you are using a quite old R version, I recommend you to update R to the latest version (3.6.2) and update your packages with.

update.packages(repos='http://cran.rstudio.com/', ask=FALSE, checkBuilt=TRUE)

Then you can try to install devtools again

1 Like

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