[R] XLConnect on Linux Mint Maya
Keith S Weintraub
kw1958 at gmail.com
Tue Jul 29 17:19:33 CEST 2014
John Et Al.
I can get rJava and XLConnect to work only if I run as super user.
Note that I have built rJava and XLConnect as super user (otherwise neither package works).
____________________________________________
Without sudo
> require(XLConnect)
Loading required package: XLConnect
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/refserv/R/i686-pc-linux-gnu-library/3.1/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
_____________________________________________
With sudo
> require(XLConnect)
Loading required package: XLConnect
XLConnect 0.2-7 by Mirai Solutions GmbH
http://www.mirai-solutions.com ,
http://miraisolutions.wordpress.com
______________________________________________
Note that I have changed the ownership (recursively) for rJava and XLConnect because they were previously owned by root. Also note that ggplot2 (included for comparison) was installed the usual way with no problem.
drwxr-xr-x 11 refserv refserv 4096 Jul 24 14:07 ggplot2/
drwxr-xr-x 10 refserv refserv 4096 Jul 29 08:28 rJava/
drwxr-xr-x 11 refserv refserv 4096 Jul 29 10:09 XLConnect/
________________________________________________
Despite "no such file or directory" above:
/home/refserv/R/i686-pc-linux-gnu-library/3.1/rJava $ ls -altr /home/refserv/>
-rwxr-xr-x 1 refserv refserv 273489 Jul 29 08:28 /home/refserv/R/i686-pc-linux-gnu-library/3.1/rJava/libs/rJava.so
The file rJava.so exists.
Thanks so much for your time and help,
Best,
KW
--
On Jul 24, 2014, at 11:16 PM, John McKown <john.archie.mckown at gmail.com> wrote:
> On Thu, Jul 24, 2014 at 8:36 PM, Keith S Weintraub <kw1958 at gmail.com> wrote:
>> Folks,
>>
>> I have been trying to get XLConnect to work on my Linux Mint Maya machine.
>>
>> R works fine but this package doesn't seem to want to build. Here is the message I get after supposedly building XLConnect and rJava:
>>
>>
>>>> require(XLConnect)
>>> Loading required package: XLConnect
>>> Error : .onLoad failed in loadNamespace() for 'rJava', details:
>>> call: dyn.load(file, DLLpath = DLLpath, ...)
>>> error: unable to load shared object '/home/refserv/R/i686-pc-linux-gnu-library/3.1/rJava/libs/rJava.so':
>>> libjvm.so: cannot open shared object file: No such file or directory
>>
>>
>> I purged the openJDK and downloaded the 1.7.0_65 JDK form Oracle.
>>
>> The build and the compile seemed to work ok as there were no errors. For example I can generate ggplot2 graphs.
>>
>> I know this is probably the wrong forum but if someone could gently point me in the right direction I would be very appreciative.
>>
>> Thanks so much for your time,
>> KW
>
> It works fine for me on Fedora 20 (and 19 before it). When I installed
> R, it installed into /usr/lib64/R. There exists a file:
> /usr/lib64/R/etc/ldpaths which is executed by the R executable script.
> This sets up the LD_LIBRARY_PATH to point to the Java installation on
> my machine. In the /usr/lib64/R/bin directory, there is a program
> called "javareconf". I would suggest that you run this with the -n
> switch, like:
>
> R CMD /usr/lib64/R/bin/javareconf -n
>
> This will show you what it _would_ do if you left off the "-n". Make
> sure it looks reasonable. If it does, then run the same command,
> without the "-n", as the "root" superuser. In my case, that would be:
>
> sudo R CMD /usr/lib64/R/bin/javareconf
>
> You need to be "root" because it update the file
> /usr/lib64/R/etc/ldpaths . I am fairly sure this will fix your
> problem.
>
> ===
>
> As a possible alternative to XLConnect, have you looked at openxlsx?
> It appears to have the same abilities, just some different syntax. It
> says that it is written in C and so should be faster than XLConnect. I
> have tested both packages, a little, and they both seem to work well.
>
> Well, it's 22:14 hours here and I wish that I could fall asleep. We're
> having problems at work and I know that the "big boss" will blame us
> peons if the hardware isn't fixed promptly Despite the fact that we
> are only software people and aren't allowed to touch the hardware. Our
> management's minds are not using the same logic as mine does.
> Frustrating.
>
> --
> There is nothing more pleasant than traveling and meeting new people!
> Genghis Khan
>
> Maranatha! <><
> John McKown
More information about the R-help
mailing list