bash:xxx:command not found
前几天在centos6.0上配好了oracle 10g并且能够执行oracle相关命令,但是今天准备往oracle里倒数据时,执行sqlplus 出现bash:command not found
[oracle@master ~]$ sqlplus /nolog
bash: sqlplus: command not found
然后google了下,是/usr/bin找不到sqlplus命令,然后对$ORACLE_HOME/bin/sqlplus在/usr/bin下建立连接
[oracle@master ~]$ ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
[oracle@master ~]$ sqlplus /nolog
bash: sqlplus: command not found
还是出现找不到命令,用which sqlplus
[oracle@master ~]$ which sqlplus
/usr/bin/which: no sqlplus in (/home/env/hbase0946/bin:/usr/java/jdk1..0_43/bin:/home/env/ant190/bin:/home/env/maven305/bin:/home/env/hadoop112/bin:/home/env/zookeeper345/bin:/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
查询结果可知$PATH中没有包含到$ORACLE_HOME/bin,既然找到了原因那就好办了。
[oracle@master ~]$ vi .bash_profile # .bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs ORACLE_BASE=/home/oracle/oracle10g
ORACLE_HOME=$ORACLE_BASE/
ORACLE_SID=orcl
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
在.bash_profile 中PATH已经包含了$ORACLE_HOME/bin,那就是说明我的profile没有起作用。
[oracle@master ~]$ source .bash_profile
[oracle@master ~]$ sqlplus /nolog SQL*Plus: Release 10.2.0.1. - Production on Thu Dec :: Copyright (c) , , Oracle. All rights reserved. SQL>
让我费解的地方是安装完oracle的时候我已经source .bash_profile并且sqlplus这些命令是有用的,只是过了几天重开终端再执行时就失效了,我并没有重启linux
bash:xxx:command not found的更多相关文章
- Linux下提示 bash: xxx command not found
今天在虚拟机上安装了CentOS5.5,发现运行一些很正常的诸如:init,shutdown,fdisk 等命令时,悍然提示: bash: xxx command not found. 那么,首先就要 ...
- linux命令存放 bash: xxx command not found
参考资料:http://blog.sina.com.cn/s/blog_688077cf01013qrk.html 提示:bash: xxx command not found 首先就要考虑root ...
- centos下一个bash: XXX: command not found解决方案
最近想centos通过做Android工程建设.配置jdk和Android sdk后,也同时/etc/profile将java和Android环境变量配置成,但它不能像windows 在相同,直接使用 ...
- 关于su下bash:xxx :command not found
今天在新建组的时候出了问题: $ su Password: # groupadd prj bash: groupadd :command not found 我就纳闷,明明是在su权限下,怎么还不能使 ...
- bash: ./xxx 权限不够
Linux环境下要运行C编译的一个可执行文件play,终端cd到当前目录后输入./play,提示 bash: ./xxx 权限不够 用sudo, 提示 sudo:./play: command no ...
- bash: hexo: command not found
问题 很久没写博客了,今天用hexo新建文章时git报错: bash: hexo: command not found 解决办法 百度之后,将D:\WorkingSoftware\GithubBlog ...
- scp报错 -bash: scp: command not found
环境:RHEL6.5 使用scp命令报错: [root@oradb23 media]# scp /etc/hosts oradb24:/etc/ -bash: scp: command not fou ...
- source /etc/profile报错-bash: id:command is not found
由于误操作导致 source /etc/profile 报错 -bash: id:command is not found 此时,linux下很多命令到不能能用,包括vi ls 等... 可以使用 e ...
- -bash: .bash_profile: command not found
今天有一同事安装了ORACLE后,在切换账号时遇到错误提示"-bash: .bash_profile: command not found".如下所示 [root@GLETestL ...
随机推荐
- Java图形化界面设计——布局管理器之CardLayout(卡片布局)
- hdu 5040 BFS 多维化处理图
http://acm.hdu.edu.cn/showproblem.php?pid=5040 跟这一题http://blog.csdn.net/u011026968/article/details/3 ...
- python 命令行参数,以及文件操作
#demo.py #!/usr/bin/python import sys print sys.argv #python demo.py 11 22 33 44 55 ['demo.py', '11' ...
- C++ signal的使用
1.头文件 #include <signal.h> 2.功能 设置某一信号的对应动作 3.函数原型 typdef void (*sighandler_t )(int); sighan ...
- linux 知识整理1linux 常见的目录
linux 系统现在也是搭配啦图形操作界面. 本人初次学习linux,不是为工作,我的工作是玩Asp.net 的.学习linux 也算是知识的储备吧. 学习linux必须知道一些基本的知识. 目录 用 ...
- ubuntu 中 ThinkPHP 上传文件无法得到文件名
在 419-424 行.
- redis之入门操作
下载安装 $ wget http://download.redis.io/releases/redis-3.2.3.tar.gz $ tar xzf redis-3.2.3.tar.gz $ cd r ...
- ThinkPHP第十四天(显示TRACE界面配置,关联模型详解定义)
1.显示TRACE界面,首选需要在显示模版界面,$this->display(),然后需要在配置文件中配置 SHOW_PAGE_TRACE => true 2.关联模型使用 主表以user ...
- Myeclipse安装Activiti
1.将压缩包内activiti文件夹放入Myeclipse\dropins文件夹内并修改activiti文件夹内Link文件指向自己的目录重启Myeclipse(这时打开bpmn文件仍会报错).2.将 ...
- Qt中QFtp获取带有中文的文件名称出现乱码的解决方法(执行操作前就转换编码)
今天研究了一下QFtp这个类,发现访问得到的文件名称中一旦出现中文,不管怎么转换编码格式,最终显示出来的始终都是乱码.由于编码错误,我写了两个函数用于互相转换编码. 一个是由正常编码转为QFTP上所谓 ...