r - dplyr.snowflakedb 是否仅与 32 位 JDK 一起运行?
问题描述
我无法在我的 Windows 10 64 位 PC 上安装该软件包。我已经安装了安装 RJDBC 所需的最新版本的 R,并且 rJava 正在加载和运行,在我使用的所有其他依赖于它的包上没有任何问题。以下是运行一些检查的结果:
> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.2 tools_3.6.2 mongolite_2.1.0 jsonlite_1.6.1
> Sys.getenv("JAVA_HOME")
[1] "C:\\Program Files\\Java\\jdk-13.0.2"
> library(rJava)
> .jinit()
> .jcall("java/lang/System", "S", "getProperty", "java.runtime.version")
[1] "13.0.2+8"
但是,当我尝试安装该软件包时,它会失败,如下所示:
> devtools::install_github("snowflakedb/dplyr-snowflakedb")
Downloading GitHub repo snowflakedb/dplyr-snowflakedb@master
√ checking for file 'C:\Users\xxxx\AppData\Local\Temp\RtmpWkzKSM\remotes326067c2358a\snowflakedb-dplyr-snowflakedb-a4299ad/DESCRIPTION' ...
- preparing 'dplyr.snowflakedb':
√ checking DESCRIPTION meta-information ...
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'dplyr.snowflakedb_0.3.0.tar.gz'
Installing package into ‘C:/Users/xxxx/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'dplyr.snowflakedb' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'dplyr.snowflakedb'
finding HTML links ... done
SnowflakeDBConnection-class html
db_snowflake_copy html
dplyr.snowflakedb html
lahman html
lahman_snowflakedb html
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'rJava':
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/xxxx/R/win-library/3.6/rJava/libs/i386/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
Error : package 'rJava' could not be loaded
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/xxxx/R/win-library/3.6/dplyr.snowflakedb'
Error: Failed to install 'dplyr.snowflakedb' from GitHub:
(converted from warning) installation of package ‘C:/Users/xxxx/AppData/Local/Temp/RtmpWkzKSM/file326067fe7d41/dplyr.snowflakedb_0.3.0.tar.gz’ had non-zero exit status
该软件包是否仅在您安装了 32 位版本的 JDK 时才有效?rJava
但是有人告诉我,如果您运行的是 64 位版本的 R ,则无法使用 32 位安装的 Java 运行。
解决方案
推荐阅读
- python - 需要等效函数来获取exchangelib Python中的别名,就像win32com中的这个(item.sender.getexchange().Alias)
- elasticsearch - ElasticSearch:地理点聚类
- c++ - c++ 类的问题
- rest - 使用 Postman 调用 DVLA MOT 历史 API 时出现“缺少身份验证令牌”错误
- angular - 如何将一个组件嵌套到另一个组件中?
- r - 如何在R中相互添加/减去行
- bash - Bash 解析日志文件值和时间戳下面两行
- python - 不同版本的帕斯卡三角、列表、python
- java - 如何使用已使用 java spring security TextEncryptor 加密的 node.js 解密文本
- javascript - 如何在不使用按钮的情况下制作引导下拉菜单?(角度 4+)