Linux -bash: ORACLE_HOME: 命令未找到

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7332725/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 06:04:06  来源:igfitidea点击:

-bash: ORACLE_HOME: command not found

linuxoracleenvironment-variables

提问by shox

the following error raise when i login to oracle account on Company Oracle CentOS linux server :

当我在公司 Oracle CentOS linux 服务器上登录 oracle 帐户时出现以下错误:

-bash: ORACLE_HOME: command not found

-bash: ORACLE_HOME: 命令未找到

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions
ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE;
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;export ORACLE_HOME;
ORACLE_SID=CPS;export ORACLE_SID;
ORACLE_TERM=xterm;export ORACLE_TERM;
PATH=/usr/sbin:$PATH;export PATH;
PATH=$ORACLE_HOME/bin:$PATH;export PATH;

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;

回答by Florin Ghita

The exports are bad:

出口不好:

ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE;

shoud be:

应该是:

export ORACLE_BASE=/u01/app/oracle

and so on.

等等。

回答by Xaerxess

You probably want to change exports as @Florin Ghita wrote, source .bashrc:

您可能想像@Florin Ghita 所写的那样更改导出,来源 .bashrc:

. ~/.bashrc

and then check

然后检查

echo $ORACLE_HOME 

to see if the variable is set.

查看是否设置了变量。

回答by anupash

ORACLE_BASE=/u01/app/oracle;export $ORACLE_BASE;

ORACLE_BASE=/u01/app/oracle;export $ORACLE_BASE;

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;export $ORACLE_HOME;

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;export $ORACLE_HOME;

ORACLE_SID=CPS;export $ORACLE_SID;

ORACLE_SID=CPS;export $ORACLE_SID;

and so on .....

等等 .....

also check u opened a new shell before checking if the environment variables are set correctly ..

在检查环境变量是否设置正确之前,还要检查你是否打开了一个新的 shell ..