[R] XLConnect on Linux Mint Maya
Jeff Newmiller
jdnewmil at dcn.davis.CA.us
Tue Jul 29 18:54:59 CEST 2014
Sounds to me like a problem outside of R (off topic here). In particular, it doesn't sound like you are using the appropriate tools (apt-get package manager for R and a JDK; R install.package() for your R packages) to admin your machine. The only thing you should need sudo for is to run apt-get... everything else should be done as a normal user unless you really know what you are doing. I had no problem installing it just now on my Ubuntu machine with OpenJDK. I have no experience with Mint but Google tells me you should be able to use the instructions for Ubuntu... I would expect Google to tell you the same thing if you ask nicely... your most challenging task at this point should be cleaning up the mess you have made by excessive use of sudo ... most likely running R with it (only update your personal R library directories so you are not tempted to go rogue) but you don't say how you installed the jdk so that could also be messed up.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On July 29, 2014 8:19:33 AM PDT, Keith S Weintraub <kw1958 at gmail.com> wrote:
>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
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list