我无法在R中安装devtools,而且我也看到过其他类似问题的帖子,但完全没有相同的错误,这些解决方案都不适合我。当我输入install.packages('devtools')时,我得到了:
Installing package into ‘C:/Users/maggi/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘fs’, ‘processx’, ‘usethis’, ‘callr’, ‘rcmdcheck’
There are binary versions available but the source versions
are later:
binary source needs_compilation
fs 1.2.7 1.3.1 TRUE
processx 3.3.0 3.4.1 TRUE
usethis 1.5.0 1.5.1 FALSE
callr 3.2.0 3.3.1 FALSE
rcmdcheck 1.3.1 1.3.3 FALSE
devtools 2.0.2 2.1.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/fs_1.2.7.zip'
Content type 'application/zip' length 973247 bytes (950 KB)
downloaded 950 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/processx_3.3.0.zip'
Content type 'application/zip' length 246452 bytes (240 KB)
downloaded 240 KB
package ‘fs’ successfully unpacked and MD5 sums checked
package ‘processx’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\maggi\AppData\Local\Temp\RtmpaoJOLV\downloaded_packages
installing the source packages ‘usethis’, ‘callr’, ‘rcmdcheck’, ‘devtools’
trying URL 'https://cran.rstudio.com/src/contrib/usethis_1.5.1.tar.gz'
Content type 'application/x-gzip' length 620225 bytes (605 KB)
downloaded 605 KB
trying URL 'https://cran.rstudio.com/src/contrib/callr_3.3.1.tar.gz'
Content type 'application/x-gzip' length 94264 bytes (92 KB)
downloaded 92 KB
trying URL 'https://cran.rstudio.com/src/contrib/rcmdcheck_1.3.3.tar.gz'
Content type 'application/x-gzip' length 45380 bytes (44 KB)
downloaded 44 KB
trying URL 'https://cran.rstudio.com/src/contrib/devtools_2.1.0.tar.gz'
Content type 'application/x-gzip' length 378899 bytes (370 KB)
downloaded 370 KB
* 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/maggi/Documents/R/win-library/3.4/usethis'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\maggi\Documents\R\win-library\3.4" C:\Users\maggi\AppData\Local\Temp\RtmpaoJOLV/downloaded_packages/usethis_1.5.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘usethis’ had non-zero exit status
* installing *source* package 'callr' ...
** package 'callr' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'processx' 3.3.0 is being loaded, but >= 3.4.0 is required
ERROR: lazy loading failed for package 'callr'
* removing 'C:/Users/maggi/Documents/R/win-library/3.4/callr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\maggi\Documents\R\win-library\3.4" C:\Users\maggi\AppData\Local\Temp\RtmpaoJOLV/downloaded_packages/callr_3.3.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘callr’ had non-zero exit status
ERROR: dependency 'callr' is not available for package 'rcmdcheck'
* removing 'C:/Users/maggi/Documents/R/win-library/3.4/rcmdcheck'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\maggi\Documents\R\win-library\3.4" C:\Users\maggi\AppData\Local\Temp\RtmpaoJOLV/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', 'rcmdcheck' are not available for package 'devtools'
* removing 'C:/Users/maggi/Documents/R/win-library/3.4/devtools'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\maggi\Documents\R\win-library\3.4" C:\Users\maggi\AppData\Local\Temp\RtmpaoJOLV/downloaded_packages/devtools_2.1.0.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\maggi\AppData\Local\Temp\RtmpaoJOLV\downloaded_packages’
我认为它无法安装某些依赖项?我看到几次类似“正在加载“名称空间'processx” 3.3.0,但需要> = 3.4.0”之类的事情。抱歉,我是一名完全编码的业余爱好者,但是如果你们中的任何人以前曾经见过此问题或知道该怎么做,我将不胜感激。我在Windows上,如果有帮助的话。