Error in running R script in cmd window - r

I have a bat file that I have run successfully for some time from the command line, which calls R and then an R script. It has failed lately, and it feels like it has something to do with package loading. I have R version 3.2.3 (2015-12-10) and RStudio Version 0.99.489.
The errors occur apparently as packages are being loaded, but they are not R errors, but rather errors looking for a variety of .dll's, ending in an 0x7e error. Not sure why R/Windows is looking for dll's (?!).
I also tried to google the "LoadLibraryFromPath" function, but got nowhere.
Here is the cmd window output:
Warning message:
package 'ggplot2' was built under R version 3.1.3
Warning message:
package 'scales' was built under R version 3.1.3
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Warning message:
package 'rkt' was built under R version 3.1.2
Loading required package: methods
LoadLibraryFromPath: FQ Dll C:\Windows\system\oci.dll is not found, error: 0x7e
LoadLibraryFromPath: FQ Dll C:\Windows\oci.dll is not found, error: 0x7e
LoadLibraryFromPath: FQ Dll C:\ProgramData\Oracle\Java\javapath\oci.dll is not f
ound, error: 0x7e
LoadLibraryFromPath: FQ Dll C:\Program Files (x86)\TIBCO\splus82\oci.dll is not
found, error: 0x7e
LoadLibraryFromPath: FQ Dll C:\app\product\11.2.0\client_1\bin\oci.dll found
LoadLibraryFromPath: FQ Dll C:\Windows\system\SQLLib80.dll is not found, error:
0x7e
LoadLibraryFromPath: FQ Dll C:\Windows\SQLLib80.dll is not found, error: 0x7e
LoadLibraryFromPath: FQ Dll C:\ProgramData\Oracle\Java\javapath\SQLLib80.dll is
not found, error: 0x7e
LoadLibraryFromPath: FQ Dll C:\Program Files (x86)\TIBCO\splus82\SQLLib80.dll is
not found, error: 0x7e
LoadLibraryFromPath: FQ Dll C:\app\product\11.2.0\client_1\bin\SQLLib80.dll is n
ot found, error: 0x7e
LoadLibraryFromPath: FQ Dll C:\Windows\system32\SQLLib80.dll is not found, error
: 0x7e
LoadLibraryFromPath: FQ Dll C:\Windows\SQLLib80.dll is not found, error: 0x7e
.
.
.
Any ideas?

I had the same issue, it was caused by windows update https://support.microsoft.com/en-us/kb/3126587
Although it is not a good solution and I don't recommend it, uninstallation of this update solves the problem.
As described in workaround of the update, reinstallation of oracle should solve it as well, but I haven't tried it yet.

I have been debugging this problem for a customer when I found this post. Now after working with the Microsoft product team I can confirm the issue you have described has been addressed and is now expected to be released through KB 3147071 on 4/12/16. Be on the lookout!

Related

How to install the rgl package in macOS Big Sur

I have been trying to install the rgl package in my macOS Big Sur, but I have failed each time.
I have downloaded R from the CRAN website, and have also installed Xquartz. After rebooting the computer, I tried to install the rgl package from the R console. It installs successfully, but whenever I type library("rgl") in the R console, the package does not load, and instead, this is shown :
Error in dyn.load(dynlib <- getDynlib(dir)) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so, 6): Symbol not found: _hb_buffer_add_utf8
Referenced from: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so
Expected in: flat namespace
in /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so
Error: package or namespace load failed for ‘rgl’:
.onLoad failed in loadNamespace() for 'rgl', details:
call: rgl.init(initValue, onlyNULL)
error: OpenGL is not available in this build
In addition: Warning messages:
1: Loading rgl's DLL failed.
This build of rgl depends on XQuartz, which failed to load.
See the discussion in https://stackoverflow.com/a/66127391/2554330
2: Trying without OpenGL...
I headed to the link that this error message mentions, and tried uninstalling rgl and Xquartz, and reinstalling them again, but the issue remains.
Moreover, here it is said that I am supposed to delete org.xquartz.startx.plist from /Library/LaunchDaemons, but from the terminal, after navigating to the Library directory, it seems that there is nothing named LaunchDaemons or LaunchAgents.
Any help would be appreciated. I am using macOS Big Sur 11.4, Xquartz 2.8.1 and rgl 0.106.8. Thanks.

Installed rJava, Installed Java 8 update. Still cannot load rJava on MacOS Sierra

Bear in mind that I am computer illiterate and new to R. I have installed the rJava package in R studio version 1.0.143 and installed Java 8 (using MacOS Sierra). When I try to load the rJava package:
library(rJava)
I get the following error
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/Users/cormac/Library/R/3.4/library/rJava/libs/rJava.so':
dlopen(/Users/cormac/Library/R/3.4/library/rJava/libs/rJava.so, 6):
Library not loaded: #rpath/libjvm.dylib
Referenced from:
/Users/cormac/Library/R/3.4/library/rJava/libs/rJava.so
Reason: image not found
In addition: Warning messages:
1: package ‘rJava’ was built under R version 3.4.2
2: running command '/usr/libexec/java_home' had status 1
Could somebody help me to interpret this error message? There is probably a very simple solution, but I am completely lost. Thank you!!
As noted in Unable to load rJava in RStudio, there is a very specific sequence of steps that must be taken to get rJava to work on a Macbook, as documented in rJava Issues #86.
Download and install Java from Oracle
Uninstall any previously installed version of rJava
Add JAVA_HOME to your .bashrc
Close & restart terminal, R and RStudio sessions so they pick up the updated JAVA_HOME
Use install.packages() to install rJava
See the URL link above for additional details on each step.

error in installing RWeka package in R

After getting RWeka package is sucessfully unpacked, when command library("RWeka") is executed it is showing an error:
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname) error: No CurrentVersion entry in
Software/JavaSoft registry! Try re-installing Java and make sure R and
Java have matching architectures. In addition: Warning message:
package ‘RWeka’ was built under R version 3.2.3 Error: package or
namespace load failed for ‘RWeka’
As the error states, make sure you have Java installed of the same architecture as R. For example if you have 32-bit R, you need to have 32-bit Java installed.
If your system is 32 bit, get yourself a 32-Bit java. If the system is 64-Bit go for 64bit java. I faced the same issue as my system is 64-Bit and i accidentally installed 32-Bit java. Uninstalled and reinstalled a 64-bit. Sorted now.

RPUD : cannot find a dll that exists

I am trying to use my GPU (GeForce GTX 770, CC 3.0) in R. I am using R 3.1.2. I have successfully installed CUDA that I use in non R projects. Now, I just installed rpud and rpudplus from the .zip file in my R environment.
install.packages("C:/Users/Windows/Desktop/R/rpux_0.5.0/rpud_0.5.0.zip",
repos = NULL)
package ‘rpud’ successfully unpacked and MD5 sums checked
And when I try to use it :
require(rpud)
Loading required package: rpud
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'C:/Program Files/R/R-3.1.2/library/rpud/libs/x64/rpud.dll':
LoadLibrary failure: Cannot find file (Le module spécifié est introuvable.)
However, the .dll is in the specified path!
The error message "cannot find file" is incomplete. It actually means that "cannot find all dependency lib of the file". In this case, it most likely means that the expected CUDA version is not found.
For rpud v0.5.0, it MUST have CUDA 6.5 installed in the system. For rpud v0.5.1, it MUST have CUDA 7.0 instead.

Error on R studio startup

I get the following error message in the console when opening Rstudio :
Error installing package: Error: ERROR: no packages specified
The filename, directory name, or volume label syntax is incorrect.
My R version is 3.1.1
This is the error you get from calling install.packages with no package specified.
> install.packages()
Error in install.packages() : no packages were specified
You might want to check whether something like that is included in your Rprofile.site file.

Resources