執行dbca命令的時候報錯了

regonly1發表於2008-08-07
執行dbca命令的時候報錯了,網上搜了一把,果然找到了解決資訊:
作業系統:RedHat Enterprise Linux AS 4
資料庫:Oracle 9206
在建立資料庫例項的時候報瞭如下錯誤:
  [root@localhost ~]# xhost +
    access control disabled, clients can connect from any host
  [root@localhost ~]# su - oracle
  [oracle@localhost ~]$ cd product/ora92/bin
  [oracle@localhost bin]$ ./dbca
   
/home/oracle/jre/1.1.8/bin/../lib/i686/native_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
  [oracle@localhost bin]$
在網站看了一下,是Oracle環境變數中的一個引數值設的不對,我剛開始設的環境變數如下:
 
[oracle@localhost ~]$ more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
#lccadd

export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/ora92
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=zytk30
export ORACLE_TERM=vt100
export LD_ASSUME_KERNEL=2.6.9
export THREADS_FLAG=native
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG=american_america.we8iso8859p1
 
用紅色標出來的LD_ASSUME_KERNEL,這個引數的值好像有規定的,那就是:
export LD_ASSUME_KERNEL=2.4.1    # for RH 9 and RHEL AS 3
export LD_ASSUME_KERNEL=2.4.19   # for RHEL AS 4
於是我將LD_ASSUME_KERNEL的值改為2.4.19後,執行如下命令:
#source .bash_profile
#more | set
然後退出登入,再次進入,這時候oracle的環境就已經生效了.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12932950/viewspace-421442/,如需轉載,請註明出處,否則將追究法律責任。

相關文章