首页 > 解决方案 > 在 R 中使用“digest”包时出错

问题描述

我最近在 R-3.4.3 中安装和使用包“digest”时遇到了一些问题,我之前在 R-3.4.1 中使用过,没有问题。以下是我从 R 收到的消息。

install.packages("digest", dependencies = TRUE)
trying URL 'https://mirror.aarnet.edu.au/pub/CRAN/bin/windows/contrib/3.4/digest_0.6.15.zip'
Content type 'application/zip' length 175238 bytes (171 KB)
downloaded 171 KB

package ‘digest’ successfully unpacked and MD5 sums checked

下载的二进制包在 C:\Users\weizha\AppData\Local\Temp\RtmpwhNFrq\downloaded_pa​​ckages

library(digest) 

Error: package or namespace load failed for ‘digest’ in FUN(X[[i]], ...): 
no such symbol digest in package E:/R 3.4.3/library/digest/libs/x64/digest.dll

以前我install.packages(devtools)在 R-3.4.1 中使用过,它也安装了“digest”,并且一切正常。最近工作将我们的操作系统升级到 Windows 10(从 7)并为我们安装了 R-3.4.3,我无法让 devtools 继续工作,我发现这是因为摘要无法正常工作,如上所示。我已经阅读了我可以在网上找到的所有内容,但我不知道如何解决这个问题。

> .libPaths()
[1] "E:/R-3.4.3/library"
> install.packages("digest", lib="E:/R-3.4.3/library")
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.csiro.au/bin/windows/contrib/3.4/digest_0.6.15.zip'
Content type 'application/zip' length 175238 bytes (171 KB)
downloaded 171 KB

package ‘digest’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\weizha\AppData\Local\Temp\RtmpCQY8o1\downloaded_packages
> library(digest)
Error: package or namespace load failed for ‘digest’ in FUN(X[[i]], ...):
 no such symbol digest in package E:/R-3.4.3/library/digest/libs/x64/digest.dll
> library("digest", lib.loc="E:/R-3.4.3/library")
Error: package or namespace load failed for ‘digest’ in FUN(X[[i]], ...):
 no such symbol digest in package E:/R-3.4.3/library/digest/libs/x64/digest.dll


> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 14393)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252   
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3   
> 

> setwd('E:/R-3.4.3')
> install.packages("digest", type="source")
trying URL 'https://cran.csiro.au/src/contrib/digest_0.6.15.tar.gz'
Content type 'application/x-gzip' length 122095 bytes (119 KB)
downloaded 119 KB

* installing *source* package 'digest' ...
** package 'digest' successfully unpacked and MD5 sums checked
** libs
Warning: running command 'make -f "E:/R-34~1.3/etc/x64/Makeconf" -f "E:/R-34~1.3/share/make/winshlib.mk" SHLIB="digest.dll" WIN=64 TCLBIN=64 OBJECTS="aes.o crc32.o digest.o init.o md5.o pmurhash.o raes.o sha1.o sha2.o sha256.o xxhash.o"' had status 127
ERROR: compilation failed for package 'digest'
* removing 'E:/R-3.4.3/library/digest'
In R CMD INSTALL

The downloaded source packages are in
        ‘C:\Users\weizha\AppData\Local\Temp\RtmpCQY8o1\downloaded_packages’
Warning messages:
1: running command '"E:/R-3.4.3/bin/x64/R" CMD INSTALL -l "E:\R-3.4.3\library" C:\Users\weizha\AppData\Local\Temp\RtmpCQY8o1/downloaded_packages/digest_0.6.15.tar.gz' had status 1 
2: In install.packages("digest", type = "source") :
  installation of package ‘digest’ had non-zero exit status

> .libPaths()
[1] "E:/R-3.4.3/library"
> install.packages("digest", type="binary")
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.csiro.au/bin/windows/contrib/3.4/digest_0.6.15.zip'
Content type 'application/zip' length 175238 bytes (171 KB)
downloaded 171 KB

package ‘digest’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\weizha\AppData\Local\Temp\Rtmp0UupHr\downloaded_packages
> library(digest)
Error: package or namespace load failed for ‘digest’ in FUN(X[[i]], ...):
 no such symbol digest in package E:/R-3.4.3/library/digest/libs/x64/digest.dll

当我从 CRAN 手动下载包时,这是我从 R 收到的

> .libPaths()
[1] "E:/R-3.4.3/library"
> library(digest)
Error: package ‘digest’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
In addition: Warning message:
package ‘digest’ was built under R version 3.5.0 
> 

标签: rpackagesdigest

解决方案


推荐阅读