.jfindClass中的R错误(as.character(driverClass)[1]):找不到类

时间:2015-06-29 06:40:24

标签: r jdbc rjava

尝试在R中安装stringi包但在下面收到奇怪的错误消息。

Loading required package: DBI
Loading required package: rJava
Error in .jfindClass(as.character(driverClass)[1]) : class not found
Calls: JDBC -> is.jnull -> .jfindClass
Execution halted
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status

查看其他帖子,但它们都与数据库驱动程序有关。不知道在我的情况下可能导致这种情况,任何帮助表示赞赏。非常感谢。

规格:Mac OSX,R Studio,R版本为3.2.0。

更新:

显然,这个问题也发生在其他软件包的安装上。以下是尝试安装DierckxSpline时的输出。

> install.packages("DierckxSpline", repos="http://R-Forge.R-project.org")
Warning in install.packages :
  dependency ‘PolynomF’ is not available
also installing the dependency ‘fda’

Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository http://R-Forge.R-project.org/bin/macosx/mavericks/contrib/3.2
Package which is only available in source form, and may need compilation of
  C/C++/Fortran: ‘DierckxSpline’
Do you want to attempt to install these from sources?
y/n: y
installing the source packages ‘fda’, ‘DierckxSpline’

trying URL 'http://R-Forge.R-project.org/src/contrib/fda_2.4.4.tar.gz'
Content type 'application/x-gzip' length 1034752 bytes (1010 KB)
==================================================
downloaded 1010 KB

trying URL 'http://R-Forge.R-project.org/src/contrib/DierckxSpline_1.1-9.tar.gz'
Content type 'application/x-gzip' length 785060 bytes (766 KB)
==================================================
downloaded 766 KB

Loading required package: DBI
Loading required package: rJava
Error in .jfindClass(as.character(driverClass)[1]) : class not found
Calls: JDBC -> is.jnull -> .jfindClass
Execution halted
Warning in install.packages :
  installation of package ‘fda’ had non-zero exit status
Loading required package: DBI
Loading required package: rJava
Error in .jfindClass(as.character(driverClass)[1]) : class not found
Calls: JDBC -> is.jnull -> .jfindClass
Execution halted
Warning in install.packages :
  installation of package ‘DierckxSpline’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/99/kh3ryr751csc6rnw79nzj0k40000gn/T/RtmpS3HGiF/downloaded_packages’

到目前为止我没有任何线索,当我谷歌它时没有任何帮助。它似乎与RStudio的Mac X问题。希望有人可以帮忙,谢谢。

1 个答案:

答案 0 :(得分:-1)

终于得到了答案并解决了,在这里: rJava 'class not found' error with makeCluster。问题发生在.Rprofile我的library(RJDBC)行和drv <- JDBC("com.sas.net.sharenet.ShareNetDriver", "/usr/local/sas/jdbc_driver/sas.intrnet.javatools.jar", identifier.quote="")行。我不知道这是在那里。我刚删除它,问题现在解决了。