安装XLConnect软件包

时间:2018-06-29 09:25:00

标签: r rjava xlconnect

我想安装XLConnect软件包,以便可以以不同的格式保存从RSQLite创建的数据库。但是当我这样做

install.packages("XLConnect")

似乎出错了

checking whether Java run-time works... ./configure: line 3747: /usr/lib/jvm/default-java/bin/java: No such file or directory
no
configure: error: Java interpreter '/usr/lib/jvm/default-java/bin/java' does not work
ERROR: configuration failed for package ‘rJava’
* removing ‘/home/mrshekar/R/x86_64-pc-linux-gnu-library/3.4/rJava’
Warning in install.packages :
  installation of package ‘rJava’ had non-zero exit status
ERROR: dependency ‘rJava’ is not available for package ‘XLConnectJars’
* removing ‘/home/mrshekar/R/x86_64-pc-linux-gnu-library/3.4/XLConnectJars’
Warning in install.packages :
  installation of package ‘XLConnectJars’ had non-zero exit status
ERROR: dependencies ‘XLConnectJars’, ‘rJava’ are not available for package ‘XLConnect’
* removing ‘/home/mrshekar/R/x86_64-pc-linux-gnu-library/3.4/XLConnect’
Warning in install.packages :
  installation of package ‘XLConnect’ had non-zero exit status

现在我在R: rJava package install failing上读到

export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre
export PATH=$PATH:$JAVA_HOME/bin

但是问题似乎仍然存在。另外,如果您查看Error of java path on loading rJava package

上的解决方案
sudo R CMD javareconf

出现错误

*** JAVA_HOME is not a valid path, ignoring

*** Cannot find any Java interpreter
*** Please make sure 'java' is on your PATH or set JAVA_HOME correspondingly

还提供了安装JDK的答案

apt-get install r-cran-rjava

即使我在vm-virtual框上执行此操作,我也会收到拒绝权限错误,它为我安装并让自己成为管理员的ubuntu 18.04版本授予了拒绝权限。

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

我该怎么办?请帮忙。

0 个答案:

没有答案