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 ...
随机推荐
- Hostker云主机
Orz现在我的博客使用Hostker主机了,地址:http://wnjxyk.cn/ 速度一下子快了很多! Hostker真的是很便宜很好用的主机呢!大家可以去试一下! 注册时填写了有效邀请码的新用户 ...
- Advanced Customization of the jQuery Mobile Buttons | Appcropolis
Advanced Customization of the jQuery Mobile Buttons | Appcropolis Advanced Customization of the jQue ...
- 关于windows服务的操作
/// <summary> /// 判断是否安装了某个服务 /// </summary> /// <param name="serviceName"& ...
- 使用coding.net来托管源码(可以免费存放私有项目的哦)(转载)
coding.net是国内新兴的一个项目管理平台,功能主要包括:代码托管.在线运行环境.监控代码质量,兼有一定的社交功能.在线运行环境支持Java.Ruby.Node.js.PHP.Python.Go ...
- webform 不实用office控件导出excel StringBuilder 类型拼接字符串表格导出excel
StringBuilder sb = new StringBuilder(); sb.AppendLine("<meta http-equiv=\"Content-Type\ ...
- 读书笔记 SQL 事务理解
事务的ACID属性 Atomicity 原子性 每个事务作为原子单元工作(即不可以再拆分),也就是说所有数据库变动事务,要么成功要么不成功. SQL Server把每个DML或者 DDL命令都当做一个 ...
- 为什么C#动态调用Java的cxf多了bool型参数
最近的一个项目需要C#调用Java的cxf发布的接口,接口参数文档只给我的是两个long型,但是通过我动态加载发现,参数是四个. 比如接口文档给的接口是 TestFunc(long, long); 而 ...
- Windows 配置JAVA的环境变量
Java是由Sun公司开发的一种应用于分布式网络环境的程序设计语言,Java语言拥有跨平台的特性,它编译的程序能够运行在多种操作系统平台上,可以实现“一次编写,到处运行”的强大功能. 工具/原料 JD ...
- QTableView表格滚动条样式(QSS真是细致到家了)
环境:Qt5.3 IDE:QtCreator 效果预览: 垂直与水平滚动条样式 代码: ui->QTableView->verticalScrollBar()->setStyleSh ...
- Windows Azure 网站自愈
编辑人员注释:本文章由 Windows Azure 网站团队的项目经理Apurva Joshi 撰写. 您有多少次在半夜被叫醒去解决一个仅需重新启动网站即可解决的问题?要是可以自动检测一些状况并自动恢 ...