sqlldr執行報錯:error while loading shared libraries: libclntsh.so.10.1:
執行shell指令碼的時候
[root@justin]# sh sqlldr_justin.sh
/home/oracle/10205/db1/bin/./sqlldr: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory
報以上錯誤
其實是環境變數沒有設定正確,可以透過export ORACLE_HOME=**之類的命令修復,不過每次都這麼敲命令太麻煩.
透過設定.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
#oracle env
ORACLE_BASE=/home/oracle
ORACLE_HOME=$ORACLE_BASE/10205/db1
ORA_CRS_HOME=$ORACLE_BASE/10205/crs/
export ORACLE_BASE ORACLE_HOME
ORACLE_SID=test
export ORACLE_SID
ORACLE_TERM=xterm
export ORACLE_TERM
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export CLASSPATH
PATH=$HOME/bin:$ORACLE_HOME/bin:$PATH:/sbin/
export PATH
接著執行shell指令碼,成功
[root@justin]# source .bash_profile
[root@justin]# sh sqlldr_justin.sh
SQL*Loader: Release 10.2.0.5.0 - Production on Tue Dec 28 15:18:45 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Load completed - logical record count 208.
[root@justin]# sh sqlldr_justin.sh
/home/oracle/10205/db1/bin/./sqlldr: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory
報以上錯誤
其實是環境變數沒有設定正確,可以透過export ORACLE_HOME=**之類的命令修復,不過每次都這麼敲命令太麻煩.
透過設定.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
#oracle env
ORACLE_BASE=/home/oracle
ORACLE_HOME=$ORACLE_BASE/10205/db1
ORA_CRS_HOME=$ORACLE_BASE/10205/crs/
export ORACLE_BASE ORACLE_HOME
ORACLE_SID=test
export ORACLE_SID
ORACLE_TERM=xterm
export ORACLE_TERM
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export CLASSPATH
PATH=$HOME/bin:$ORACLE_HOME/bin:$PATH:/sbin/
export PATH
接著執行shell指令碼,成功
[root@justin]# source .bash_profile
[root@justin]# sh sqlldr_justin.sh
SQL*Loader: Release 10.2.0.5.0 - Production on Tue Dec 28 15:18:45 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Load completed - logical record count 208.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15480802/viewspace-688362/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- error while loading shared libraries: libclntsh.so.10.1ErrorWhile
- csscan: error while loading shared libraries: libclntsh.so.10.1CSSErrorWhile
- MySQL 啟動報錯 error while loading shared librariesMySqlErrorWhile
- error while loading shared librariesErrorWhile
- 使用SRVCTL時報錯:error while loading shared librariesErrorWhile
- ./ggsci: error while loading shared librariesErrorWhile
- ORACLE SQLPLUS 報 error while loading shared libraries[轉]OracleSQLErrorWhile
- sqlplus: error while loading shared librariesSQLErrorWhile
- EBS應用克隆sqlplus : error While Loading Shared Libraries: libclntsh.so.10.1SQLErrorWhile
- MongoDB報錯mongorestore: error while loading shared libraries: libsasl2.so.2MongoDBRESTErrorWhile
- 解決"error while loading shared libraries: libclntshErrorWhile
- 【故障處理】csscan工具無法使用,報錯“error while loading shared libraries...”CSSErrorWhile
- error while loading shared libraries 錯誤解決辦法總結ErrorWhile
- error while loading shared libraries: libaio.so.1ErrorWhileAI
- Error while loading shared libraries: libssl.so.6:ErrorWhile
- Mysql的error while loading shared libraries解決方法MySqlErrorWhile
- MySQL 5.7初始化報錯error while loading shared libraries: libnuma.so.1MySqlErrorWhile
- mongod: error while loading shared libraries: libstdc++.so.6GoErrorWhileC++
- innobackupex: error while loading shared libraries: libssl.so.6ErrorWhile
- glodengate配置時報ggsci: error while loading shared librariesErrorWhile
- error while loading shared libraries: libcap.so.1: cannot open sharedErrorWhile
- 錯誤 error while loading shared libraries: libclntsh.so.9.0 的解決ErrorWhile
- error while loading shared libraries: libgsl.so.27: cannot open shared objectErrorWhileObject
- error while loading shared libraries: libgconf-2.so.4:ErrorWhileGC
- ggsci: error while loading shared libraries: libnnz11.soErrorWhile
- error while loading shared libraries: libstdc++.so.5: cannot openErrorWhileC++
- sqlplus: error while loading shared libraries的解決方案SQLErrorWhile
- 執行csscan出現loading shared libraries錯誤CSS
- error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No suchErrorWhileIBMMySqlclientObject
- 故障解決:error while loading shared libraries: libncurses.so.5ErrorWhile
- sqlplus: error while loading shared libraries: libaio.so.1:SQLErrorWhileAI
- sqlplus: error while loading shared libraries: libsqlplus.soSQLErrorWhile
- [mysql]error while loading shared libraries: libaio.so.1: 解決方案MySqlErrorWhileAI
- Error while loading shared libraries: libreadline.so.7: cannot open shared objecErrorWhileOBJ
- error while loading shared libraries: libodm9.so: cannot open shared object file: No such file or diErrorWhileObject
- 錯誤"error while loading shared libraries: xxx.so.x" 的原因和解決辦法ErrorWhile
- error while loading shared libraries: xxx.so.x"錯誤的原因和解決辦法ErrorWhile
- "error while loading shared libraries: xxx.so.x" 錯誤的原因和解決辦法ErrorWhile