Issue with Package installation in temp folders

While installing packages, the packages are getting installed in AppData\Local\Temp\ location instead of library of R 3.3.0 and could not be loaded.
Example:

> install.packages("devtools")
There are binary versions available but the source versions are later:
           binary source needs_compilation
processx  2.0.0.1  3.3.1              TRUE
callr       2.0.3  3.2.0              TRUE
git2r      0.21.0 0.25.2              TRUE
rcmdcheck   1.2.1  1.3.3             FALSE
usethis     1.3.0  1.5.0             FALSE
devtools   1.13.5  2.0.2             FALSE

* installing *source* package 'pkgbuild' ...
** package 'pkgbuild' successfully unpacked and MD5 sums checked
** R
** preparing package for lazy loading
Error : .onLoad failed in loadNamespace() for 'callr', details:
  call: loadNamespace(name)
  error: there is no package called 'debugme'
ERROR: lazy loading failed for package 'pkgbuild'
* removing 'C:/Users/Arup Baksi/Documents/R/win-library/3.3/pkgbuild'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-33~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Arup Baksi\Documents\R\win-library\3.3" C:\Users\ARUPBA~1\AppData\Local\Temp\RtmpQXG3Dm/downloaded_packages/pkgbuild_1.0.3.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 : object 'glue_collapse' is not exported by 'namespace:glue'
ERROR: lazy loading failed for package 'usethis'
* removing 'C:/Users/Arup Baksi/Documents/R/win-library/3.3/usethis'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-33~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Arup Baksi\Documents\R\win-library\3.3" C:\Users\ARUPBA~1\AppData\Local\Temp\RtmpQXG3Dm/downloaded_packages/usethis_1.5.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘usethis’ had non-zero exit status
ERROR: dependency 'pkgbuild' is not available for package 'rcmdcheck'
* removing 'C:/Users/Arup Baksi/Documents/R/win-library/3.3/rcmdcheck'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-33~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Arup Baksi\Documents\R\win-library\3.3" C:\Users\ARUPBA~1\AppData\Local\Temp\RtmpQXG3Dm/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 'pkgbuild', 'pkgload', 'rcmdcheck', 'usethis' are not available for package 'devtools'
* removing 'C:/Users/Arup Baksi/Documents/R/win-library/3.3/devtools'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-33~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Arup Baksi\Documents\R\win-library\3.3" C:\Users\ARUPBA~1\AppData\Local\Temp\RtmpQXG3Dm/downloaded_packages/devtools_2.0.2.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\Arup Baksi\AppData\Local\Temp\RtmpQXG3Dm\downloaded_packages’

Hi @arubox! Welcome!

Your packages aren't being installed to a temp folder — what's happening is that they are failing to install at all :frowning:.

The install.packages() messages assume that you know a lot about how install.packages() works, which makes them confusing to parse if you don't! It makes sense to imagine that the final message is some sort of summary of the status of the installation attempt, but this is not the case. It's just a note from install.packages() telling you where it put the files it initially downloaded and tried to install from.

You appear to be running a version of R that is quite old (R 3.3, the current version is R 3.6). Package installation gets much more challenging when you run older versions of R. Pre-compiled binaries are only made available for the current R release, and the immediately previous release (so right now, R 3.6 and R 3.5) — if you're running anything older than that, you will need to install packages from source, which requires additional setup.

So as a first step, I'd recommend you update your R to the latest version, then try installing your packages again.

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