简体   繁体   中英

ERROR: lazy loading failed for package 'TStools'

I'm trying to install the package TStools for R. I have tried all the suggestion I've found so far through googleing, but nothing works. I get every time the same exact error:

    devtools::install_github("trnnick/TStools")
Downloading GitHub repo trnnick/TStools@HEAD
  
   checking for file 'C:\Users\perep\AppData\Local\Temp\RtmpgdT8Yx\remotes9431bd6348\trnnick-TStools-bb9c40a/DESCRIPTION' ...
  
   checking for file 'C:\Users\perep\AppData\Local\Temp\RtmpgdT8Yx\remotes9431bd6348\trnnick-TStools-bb9c40a/DESCRIPTION' ... 
  
√  checking for file 'C:\Users\perep\AppData\Local\Temp\RtmpgdT8Yx\remotes9431bd6348\trnnick-TStools-bb9c40a/DESCRIPTION'

-  preparing 'TStools':
   checking DESCRIPTION meta-information ...
  
   checking DESCRIPTION meta-information ... 
  
√  checking DESCRIPTION meta-information
  
-  checking for LF line-endings in source and make files and shell scripts  
-  checking for empty or unneeded directories
-  looking to see if a 'data/datalist' file should be added
-  building 'TStools_3.0.0.tar.gz'

 Installing package into ‘C:/Users/perep/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'TStools' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error: (converted from warning) package 'forecast' was built under R version 3.6.3
Execution halted
ERROR: lazy loading failed for package 'TStools'
* removing 'C:/Users/perep/Documents/R/win-library/3.6/TStools'
* restoring previous 'C:/Users/perep/Documents/R/win-library/3.6/TStools'
Error: Failed to install 'tstools' from GitHub:
  (converted from warning) installation of package ‘C:/Users/perep/AppData/Local/Temp/RtmpgdT8Yx/file9439ae7090/TStools_3.0.0.tar.gz’ had non-zero exit status

The info of my session is as follows:

session_info()
- Session info -----------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.6.1 (2019-07-05)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       Rgui                        
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/Sao_Paulo           
 date     2021-01-29                  

- Packages ---------------------------------------------------------------------------------------
 package     * version date       lib source        
 assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.6.1)
 callr         3.5.1   2020-10-13 [1] CRAN (R 3.6.3)
 cli           2.2.0   2020-11-20 [1] CRAN (R 3.6.3)
 crayon        1.3.4   2017-09-16 [1] CRAN (R 3.6.1)
 curl          4.3     2019-12-02 [1] CRAN (R 3.6.2)
 desc          1.2.0   2018-05-01 [1] CRAN (R 3.6.1)
 devtools    * 2.3.2   2020-09-18 [1] CRAN (R 3.6.3)
 digest        0.6.27  2020-10-24 [1] CRAN (R 3.6.3)
 ellipsis      0.3.1   2020-05-15 [1] CRAN (R 3.6.3)
 fansi         0.4.2   2021-01-15 [1] CRAN (R 3.6.3)
 fs            1.5.0   2020-07-31 [1] CRAN (R 3.6.3)
 glue          1.4.2   2020-08-27 [1] CRAN (R 3.6.3)
 magrittr      2.0.1   2020-11-17 [1] CRAN (R 3.6.3)
 memoise       1.1.0   2017-04-21 [1] CRAN (R 3.6.1)
 pkgbuild      1.2.0   2020-12-15 [1] CRAN (R 3.6.3)
 pkgload       1.1.0   2020-05-29 [1] CRAN (R 3.6.3)
 prettyunits   1.1.1   2020-01-24 [1] CRAN (R 3.6.2)
 processx      3.4.5   2020-11-30 [1] CRAN (R 3.6.3)
 ps            1.5.0   2020-12-05 [1] CRAN (R 3.6.3)
 R6            2.5.0   2020-10-28 [1] CRAN (R 3.6.3)
 remotes       2.2.0   2020-07-21 [1] CRAN (R 3.6.3)
 rlang         0.4.10  2020-12-30 [1] CRAN (R 3.6.3)
 rprojroot     2.0.2   2020-11-15 [1] CRAN (R 3.6.3)
 sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 3.6.1)
 testthat      3.0.1   2020-12-17 [1] CRAN (R 3.6.3)
 usethis     * 1.6.3   2020-09-17 [1] CRAN (R 3.6.3)
 withr         2.4.1   2021-01-26 [1] CRAN (R 3.6.1)

[1] C:/Users/perep/Documents/R/win-library/3.6
[2] C:/Program Files/R/R-3.6.1/library

Please, take into account that TStools is different from tstools: I was able to install the later without problems. Any suggestion?

Looks like you have libraries compiled with different versions of R in your library folder. The error message is very clear:

Error: (converted from warning) package 'forecast' was built under R version 3.6.3

Remove the forecast folder from C:/Users/perep/Documents/R/win-library/3.6/ and try reinstalling TStools again.

If this doesn't work, you should probably try to compile forecast from source (though under Windows this is a bit more tricky and you need Rtools for that), or eventually upgrading to R version 3.6.3 and try installing TStools there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM