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 ...
随机推荐
- smarty如何处理状态值的显示
比如状态,有效或者无效.这个数据库中保存的是1或者2这样的字段. 显示在列表的时候不能是1或者2吧. 以前,我都是在后台foreach,处理的.感觉处理之后,前台就不灵活了.这个值就被替换成了文字. ...
- tarjan算法大意
Tarjan算法 (以发现者Robert Tarjan命名)是一个在图中寻找强连通分量的算法.算法的基本思想为:任选一结点开始进行深度优先搜索dfs(若深度优先搜索结束后仍有未访问的结点,则再从中任选 ...
- Eclipse、MyEclipse优化,提高运行速度
MyEclipse 是公认的优秀的软件开发工具,使用非常广泛.相信很多人在使用的过程中,发现其运行速度比较慢,因为每次操作的背后,它调用了很多的命令,执行了很多操作:但是其中大部分的操作都是非必须的: ...
- POJ训练计划1459_Power Network(网络流最大流/Dinic)
解题报告 这题建模实在是好建.,,好贱.., 给前向星给跪了,纯dinic的前向星居然TLE,sad.,,回头看看优化,.. 矩阵跑过了.2A,sad,,, /******************** ...
- dos下遍历目录和文件的代码(主要利用for命令)
对指定路径指定文件进行遍历的程序,这里有多个批处理代码,但运行好像有些问题,大家可以根据需要选择 ===== 文件夹结构 ======================================= ...
- 初识EF
1. EF是Entity Framework的缩写,全称是(ADO.Net Entity Framework),是以ADO.Net为基础所发展出来的对象关系对应(O/R Mapping)解决方案,早起 ...
- spring MVC中文乱码相关总结
总结几种方式,都使用的话能解决大多数乱码的情况 1.所有页面使用 <%@page language="java" pageEncoding="UTF-8" ...
- 反射以及 getDeclaredMethods()和getMethods()区别
内容转载自http://blog.csdn.net/ljphhj/article/details/12858767 package cn.lee.demo; import java.lang.refl ...
- GBK转utf-8,宽字符转窄字符
//GBK转UTF8 string CAppString::GBKToUTF8(const string & strGBK) { string strOutUTF8 = "" ...
- easyui form提交文件(上传图片和文件)
<div id="dialogBtn"> <a class="easyui-linkbutton" href="#" on ...