2014-03-30 59 views
2

我在AWS EC2使用R: AMI ID的R - 安裝rJava上RStudio - Amazon雲

RStudio-0.98.501_R-3.0.3_ubuntu-13.10-64bit(AMI-f06131a2)

和我無法安裝rJava。

據我知道我沒有獲得Ubuntu的命令行運行該代碼: 命令和apt-get安裝上r-cran-rjava

以下是錯誤。 RStudio內部有什麼我可以做的嗎?

Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.0’ 
(as ‘lib’ is unspecified) 
trying URL 'http://cran.rstudio.com/src/contrib/rJava_0.9-6.tar.gz' 
Content type 'application/x-gzip' length 567515 bytes (554 Kb) 
opened URL 
================================================== 
downloaded 554 Kb 

* installing *source* package ‘rJava’ ... 
** package ‘rJava’ successfully unpacked and MD5 sums checked 
checking for gcc... gcc -std=gnu99 
checking whether the C compiler works... yes 
checking for C compiler default output file name... a.out 
checking for suffix of executables... 
checking whether we are cross compiling... no 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc -std=gnu99 accepts -g... yes 
checking for gcc -std=gnu99 option to accept ISO C89... none needed 
checking how to run the C preprocessor... gcc -std=gnu99 -E 
checking for grep that handles long lines and -e... /bin/grep 
checking for egrep... /bin/grep -E 
checking for ANSI C header files... yes 
checking for sys/wait.h that is POSIX.1 compatible... yes 
checking for sys/types.h... yes 
checking for sys/stat.h... yes 
checking for stdlib.h... yes 
checking for string.h... yes 
checking for memory.h... yes 
checking for strings.h... yes 
checking for inttypes.h... yes 
checking for stdint.h... yes 
checking for unistd.h... yes 
checking for string.h... (cached) yes 
checking sys/time.h usability... yes 
checking sys/time.h presence... yes 
checking for sys/time.h... yes 
checking for unistd.h... (cached) yes 
checking for an ANSI C-conforming const... yes 
checking whether time.h and sys/time.h may both be included... yes 
configure: checking whether gcc -std=gnu99 supports static inline... 
yes 
checking whether setjmp.h is POSIX.1 compatible... yes 
checking whether sigsetjmp is declared... yes 
checking whether siglongjmp is declared... yes 
checking Java support in R... present: 
interpreter : '/usr/bin/java' 
archiver : '/usr/bin/jar' 
compiler : '/usr/bin/javac' 
header prep.: '/usr/bin/javah' 
cpp flags : '-I/usr/lib/jvm/java-7-openjdk-amd64/jre/../include' 
java libs : '-L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm' 
checking whether Java run-time works... 
./configure: line 3729: /usr/bin/java: No such file or directory 
no 
configure: error: Java interpreter '/usr/bin/java' does not work 
ERROR: configuration failed for package ‘rJava’ 
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.0/rJava’ 
Warning in install.packages : 
    installation of package ‘rJava’ had non-zero exit status 

The downloaded source packages are in 
    ‘/tmp/RtmpYSTRK3/downloaded_packages’ 
+0

她有JDK,請看配置輸出。 –

+0

也許需要設置JAVA_HOME – jdharrison

回答

2

您試過sudo apt-get install r-cran-rjava

是否有原因讓您無法使用發行版的rJava軟件包?

+1

我沒有訪問Ubuntu的權限。我登錄到rstudio並註銷。 –

+0

這有點不尋常。但是,如果確實如此,那麼您可能不得不接受您可能無法安裝某些軟件包。 –

+1

在2:52觀看此視頻。我登錄並註銷如下:http://www.louisaslett.com/RStudio_AMI/video_guide.html –

0

我在安裝依賴rJava的軟件包時遇到了問題。 Dirk的建議在全新安裝的Ubuntu上運行得很有魅力13.10