Installing XLConnect package
Installing XLConnect package
I was wanting to install XLConnect package so that i could save my databses created from RSQLite in different formats. But when i do
install.packages("XLConnect")
it seems to give error
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
Now i read on R: rJava package install failing about the
export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre
export PATH=$PATH:$JAVA_HOME/bin
but still the problem seeems to persist. Also if you look at the solution on Error of java path on loading rJava package
sudo R CMD javareconf
It gives the error
*** 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
Also for the install JDK answer
apt-get install r-cran-rjava
I get the permission denied error even if i do it on vm-virtual box it gives me permission denied for the ubuntu 18.04 version i have installed and made myself the admin.
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?
What should i do? Please help.
odbc
can i save the databases i create using the dbConnect as .csv or other formats using odbc? @Shinobi_Atobe
– mrigank shekhar
Jun 29 at 9:57
yes, you can use tools from the
DBI
package: i.e df <- dbGetQuery(connection, "select * from xxxx")
– Shinobi_Atobe
Jun 29 at 10:17
DBI
df <- dbGetQuery(connection, "select * from xxxx")
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
The best practice with rJava seems to be avoid using this annoying package wherever possible. switching R versions to or from 32/64 bit in global options sometimes works. Alternatively could you use a non Java connection package like
odbc
instead?– Shinobi_Atobe
Jun 29 at 9:44