Can't install rJava 0.9 on Ubuntu 10.04

后端 未结 4 1985
遇见更好的自我
遇见更好的自我 2021-02-19 02:12

I use R 2.13 from the CRAN apt repo for Ubuntu 10.04, and I\'m trying to install Deducer, which requires JGR/rJava, but rJava refuses to build/install, complaining about being u

相关标签:
4条回答
  • 2021-02-19 02:47

    Dah, not long after posting I found the answer here:

    http://r-interface.blogspot.com/2012/04/install-r-jgr-and-deducer-in-ubuntu.html

    Although I already had Sun Java installed, the key was to run update-java-alternatives to actually switch to Sun Java first before running javareconf:

    sudo update-java-alternatives -s java-6-sun
    sudo R CMD javareconf
    
    0 讨论(0)
  • 2021-02-19 03:00

    DWright is right..an alternative instead export it every time than you start R is locate your java path

     sudo locate libjvm.so
    

    and add ir to ldpaths

     sudo gedit /etc/R/ldpaths 
    
    i.e 
    ${JAVA_HOME=/usr/java/jdk1.7.0_07/jre} 
    
    0 讨论(0)
  • 2021-02-19 03:01

    Here's another option:

    before running R, do this

    export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.6.0-openjdk/jre/lib/amd64/server
    

    (for path above, substitute location of your particular libjvm.so, if you have a different configuration). To find libjvm.so, you can do

    sudo updatedb && locate libjvm.so
    
    0 讨论(0)
  • 2021-02-19 03:02

    One other (relatively obvious) warning: don't do what I did and install both java6 and java7. That led to a conflict I was unable to 'fix' via specifying paths and environment variables. Removing both and reinstalling java6 led to successful installation of JGR. ( This under ubuntu precise, on an Apple G4 powerbook)

    0 讨论(0)
提交回复
热议问题