When installing rJava package on Linux box, we got the following errors:

[KRX2A1]oracle@krx2adb01:/home/oracle> R CMD INSTALL rJava_0.9-4.tar.gz

* installing to library ‘/usr/lib64/R/library’

* installing *source* package ‘rJava’ ...

** package ‘rJava’ successfully unpacked and MD5 sums checked

checking for gcc... gcc -m64 -std=gnu99

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables... 

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc -m64 -std=gnu99 accepts -g... yes

checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed

checking how to run the C preprocessor... gcc -m64 -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 -m64 -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 : '/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre/bin/java'

archiver    : '/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/bin/jar'

compiler    : '/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/bin/javac'

header prep.: '/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/bin/javah'

cpp flags   : '-I/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/include -I/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/include/linux'

java libs   : '-L/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre/lib/amd64/server -L/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre/lib/amd64 -L/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre/../lib/amd64 -ljvm'

checking whether JNI programs can be compiled... yes

checking JNI data types... configure: error: One or more JNI types differ from the corresponding native type. You may need to use non-standard compiler flags or a different compiler in order to fix this.

ERROR: configuration failed for package ‘rJava’

* removing ‘/usr/lib64/R/library/rJava’


This is caused by not setting up the JAVA-related environmental parameter. Firstly, we need to set up the parameter and then execute the javareconf as follows:

[KRX2A1]oracle@krx2adb01:/home/oracle> export JAVA_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre

[KRX2A1]oracle@krx2adb01:/home/oracle> R CMD javareconf -e

Java interpreter : /u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre/bin/java

Java version     : 1.5.0_30

Java home path   : /u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre

Java compiler    : /u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre/../bin/javac

Java headers gen.: /u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre/../bin/javah

Java archive tool: /u01/app/oracle/product/11.2.0.3/dbhome_1/jdk/jre/../bin/jar

Java library path: $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64

JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -ljvm

JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux


The following Java variables have been exported:

JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH

Running: /bin/bash

Here I used the pre-installed JDK 1.5.x from Oracle Database 11g R2. If you want, you can install the latest Oracle Java 7 or 8, too.


As shown above, JAVA_HOME is exported, but due to this, the required libjvm.so library cannot be successfully loaded. Hence, before installing rJava package, we need to unset it by executing

[oracle@krx2adb01 ~]$ unset JAVA_HOME

[oracle@krx2adb01 ~]$ R CMD INSTALL rJava_0.9-4.tar.gz


Now, it works pretty well.


Good Luck!!


Posted by 겨울이 오나보다
Open the $ORACLE_BASE/oraInventory/logs/install_<timestamp>.log file to have a look at the specific error message.

Usually almost linking errors are arisen from any missing RPM packages. Very frequently I got the following error on the installation:

INFO: mv -f /oracle/app/product/10.2.0/db_1/bin/ctxlc /oracle/app/product/10.2.0/db_1/bin/ctxlcO 

INFO: mv ctxlc /oracle/app/product/10.2.0/db_1/bin/ctxlc 


INFO: chmod 751 /oracle/app/product/10.2.0/db_1/bin/ctxlc 

INFO: gcc -m32 -o ctxhx -L/oracle/app/product/10.2.0/db_1/ctx//lib32/ -L/oracle/app/product/10.2.0/db_1/lib32/ -L/oracle/app/product/10.2.0/db_1/lib32/stubs/ /oracle/app/product/10.2.0/db_1/ctx/lib/ctxhx.o -L/oracle/app/product/10.2.0/db_1/ctx/lib/ -ldl -lm -lctxhx -Wl,-rpath,/oracle/app/product/10.2.0/db_1/ctx/lib -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /oracle/app/product/10.2.0/db_1/lib/sysliblist` 

INFO: /usr/bin/ld: crt1.o: No such file: No such file or directory 

INFO: collect2: ld returned 1 exit status 

INFO: make: *** [ctxhx] Error 1 

INFO: End output from spawned process. 
INFO: ---------------------------------- 
INFO: Exception thrown from action: make 
Exception Name: MakefileException 
Exception String: Error in invoking target 'install' of makefile '/oracle/app/product/10.2.0/db_1/ctx/lib/ins_ctx.mk'. See '/oracle/app/oraInventory/logs/installActions2010-11-23_12-04-56PM.log' for details. 
Exception Severity: 1


This error is shown up to us because the linking compiler can not find the required package: libXp for i386. Just install the package and click to retry to link.

For the full list of package requirement of installing of Oracle 10g R2 (x86_64), refer to the following website:

libstdc++-devel (x86_64)
libstdc++-devel (i386) 
sysstat (x86_64)
glibc-devel (x86_64)
glibc-devel (i386) 

libaio-devel (x86_64)
libaio-devel (i386) 
gcc (x86_64)
gcc-c++ (x86_64)
elfutils-libelf-devel-static (x86_64)
elfutils-libelf-devel-static (i386)
unixODBC-devel (x86_64)
unixODBC-devel (i386)
compat-db (x86_64)
compat-gcc-34 (x86_64)
compat-gcc-34 (i386) 
compat-libstdc++-34 (x86_64)
compat-libstdc++-34 (i386)
libXp (i386)


The second error to mention is due to the incompatibility to GLIBC's version. It looks like the followings:

INFO: make[1]: *** [/oracle/app/product/10.2.0/db_1/sysman/lib/e2eme] Error 1 

INFO: make[1]: Leaving directory `/oracle/app/product/10.2.0/db_1/sysman/lib' 

INFO: make: *** [e2eme] Error 2 

INFO: End output from spawned process. 
INFO: ---------------------------------- 
INFO: Exception thrown from action: make 
Exception Name: MakefileException 
Exception String: Error in invoking target 'agent nmo nmb' of makefile '/oracle/app/product/10.2.0/db_1/sysman/lib/ins_sysman.mk'. See '/oracle/app/oraInventory/logs/installActions2010-11-23_12-04-56PM.log' for details. 
Exception Severity: 1


For this, just open the <Installation Package Dir>/install/oraparam.ini file with text editor. And then, find the line including [Linux-redhat-4.0-required] and replace the value of KERNEL with the one which is available by running the following command: uname -a

And, of course, change the content of the /etc/redhat-release file to redhat-4.

And. everything will be OK.

Any question? Let me know. 

Posted by 겨울이 오나보다
마음이 너무 허전하고.. 우울하고.. 눈물도 나도 모르게 솟구치는데.. 난 정말 나를 위해 할 수 있는게 없네.
가족을 생각하면.. 그리고 아이들을 생각하면.. 강해져야 한다는거.. 노력해야 한다는거.. 열심히 살아야 하는거 잘 아는데 마음처럼 말처럼 쉽지 않다. 지금은 내가 내 마음을 다스리기가 너무 어려운 것 같아..

죽음이라는게 예전에는 참 무섭고 두려운 것으로만 느껴졌는데 이제는 그냥 내 주변의 이야기인양 느껴진다. 단지 걱정? 혹은 두려움? 죽음이란걸 생각하면 아프지 않게 편안히 가면 좋을 것 같다는 생각이 든다..

내가 이 세상을 살면서 뭔가 도움이 될 수 있을까? 답이 없다. 내 한몸도 지금 제어하고 간추리질 못하는데 남에게 도움을 주고 한다는게 참 우습다..

죽음이 내 지척에 있음을 느낄 때마다 두렵지만 가끔은 평안함이 느껴지는데.. 난 나를 어떻게 할 수가 없다.. ㅠ..ㅠ

난 왜 사는걸까? 나를 위해서? 남을 위해서? 내 가족을 위해서? 원래 답이 없다지만 그래도 답을 알고 싶고 아니면 누군가가 그 답을 알려주면 좋겠다. 내가 왜 지금 이 시간을 견디며 살아야 하는지..

그래도 살고 싶을 때도 있을테지? 그러고 싶다. ㅠ..ㅠ

난 나라는 존재가 무섭고.. 또한 바보스럽고.. 너무 한심하게만 보인다.. 내가 나를 못믿고 우습게 보는데 남들이야 오죽이나 못난 사람이라고 볼까..

살아야할 이유를 나도 가지고 싶다~~~ 

Posted by 겨울이 오나보다