使用
时显示错误devtools::install_github("tomwenseleers/export")
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error: package or namespace load failed for 'export':
.onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/User/Documents/R/win-library/3.4/rJava/libs/i386/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application
Error: loading failed
Execution halted
*** arch - x64
Warning: replacing previous import 'ReporteRs::renderFlexTable' by 'rtable::renderFlexTable' when loading 'export'
ERROR: loading failed for 'i386'
* removing 'C:/Users/User/Documents/R/win-library/3.4/export'
In R CMD INSTALL
我已尝试过在stackflow上找到的所有内容,例如来自.onLoad failed in loadNamespace() for 'rJava' when installing a package。这是我到目前为止所尝试的内容:
1)使用
设置JAVA HOMESys.setenv(JAVA_HOME='C:\\Program Files\\Java\\jre1.8.0_151') or
Sys.setenv(JAVA_HOME='C:\\Program Files (x86)\\Java\\jre1.8.0_151')
2)将"--no-multiarch"
添加为:
devtools::install_github("tomwenseleers/export",INSTALL_opts="--no-multiarch")
3)退出R会话并重新打开R,重新下载JAVA 8和rJava
4)指出jvm.dll路径
Sys.setenv(JAVA_HOME='C:\\Program Files\\Java\\jre1.8.0_45\\bin\\client')
我只是不明白我怎么能解决这个问题......
任何想法都会有所帮助!