所以我需要在我的 Rapache 程序中访问 MSSQL 服务器,当我尝试在我的 Rapache 代码中将 RJDBC 作为库加载时,我得到服务器错误。在日志中它看起来像这样:
referer: http://10.21.8.145/
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/lib/R/site-library/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: package/namespace load failed for 'rJava'
Traceback:
5: stop(gettextf("package/namespace load failed for %s", sQuote(package)),
call. = FALSE, domain = NA)
4: library(rJava)
3: eval.with.vis(expr, envir, enclos)
2: eval.with.vis(ei, envir)
1: source("/var/www/brew/optimization.R")
[Fri Jun 15 13:57:29 2012] [error] [client 10.21.2.79] File does not exist: /var/www/favicon.ico
我还检查了 rJava.so 存在于该目录中。它与 libjvm.so 有关吗?
问题是当我在 R 中运行这个库(RJDBC)时,它说:
Loading required package: DBI
Loading required package: rJava
Warning message:
replacing previous import 'show' when loading 'rJava'
然后我所有的 RJDBC 代码都可以正常工作。那么这是某些 Java 配置的问题,还是 rApache 由于警告消息而无法运行库的问题?