R - Error : .onLoad failed in loadNamespace() for 'rJava'

前端 未结 6 1184
北荒
北荒 2020-11-28 09:45

While loading rJava package, I receive this error:

Error : .onLoad failed in loadNamespace() for \'rJava\', details:
  call: inDL(x         


        
6条回答
  •  粉色の甜心
    2020-11-28 10:32

    I have noticed in different fresh installations of R, RStudio and rJava in WIndows, that what fixes the error is:

    1. Uninstall R
    2. Reinstall R but only selecting one architecture. Example, x64, or x86, but not both. That tends to confuse R or RStudio when they are compiling.

    In my case, I fixed the message

    Error : .onLoad failed in loadNamespace() for 'rJava', details:
      call: inDL(x, as.logical(local), as.logical(now), ...)
    
    error: unable to load shared object 'C:/Users/ankitagarwal5/Documents/R/win-library/3.2/rJava/libs/x64/rJava.dll':
      LoadLibrary failure:  %1 is not a valid Win32 application.
    

    Following steps 1 and 2 above.

提交回复
热议问题