shell脚本无法使用source的原因及解决方法
来源:互联网 发布:淘宝小号批发一手货源 编辑:程序博客网 时间:2024/06/04 18:21
现象: shell脚本中source aaa.sh时提示 source: not found
例如:
$ source aaa.sh-sh: source: command not found
原因:通过使用一下命令来检查
ls -l `which sh`
会提示如下信息:
lrwxrwxrwx 1 root root 4 Apr 21 13:57 /bin/sh -> dash
说明使用了dash来进行解析的。
改回方法:
执行如下命令:
sudo dpkg-reconfigure dash
然后会提示如下界面:
然后选中敲回车,然后再次使用
ls -l `which sh`
查看结果:
lrwxrwxrwx 1 root root 4 Apr 21 13:57 /bin/sh -> bash
OK,大功告成,此时可以试一试了,如果还提示command not found 则需要重启机器就好了。
原文链接:ubuntu12.04中shell脚本无法使用source的原因及解决方法
0 0
- shell脚本无法使用source的原因及解决方法
- shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- debian中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- ubuntu12.04中shell脚本无法使用source的原因及解决方法
- 出现 JSP页面中使用JSTL标签无法解析 错误的原因及解决方法
- 无法在fat32中执行shell脚本的解决方法
- 以管理员身份运行脚本一闪而过的原因及解决方法
- flash,activeX,applet,shockwave无法浏览的原因及解决方法
- IE无法浏览网页的常见原因及解决方法
- oracle服务无法启动的原因及解决方法
- IE无法浏览网页的常见原因及解决方法
- 网卡无法自动获取IP地址的原因及解决方法
- 开发板无法加载驱动的原因及解决方法
- IIS无法下载文件的原因及解决方法
- 云客Drupal8源码分析之实体类型管理器、实体类型、实体Entity
- 浏览器的标准模式和怪异模式之间的区别
- linux编译找不到apr问题解决办法
- C++第四次作业
- Ubuntu 14.04上 安装 OpenJDK8
- shell脚本无法使用source的原因及解决方法
- 通过 console.log($("#MyForm"));,形象的看一下,jQuery对象,都是什么?
- 记录 laravel session失效问题
- 购物车
- C++实验4
- C++实验五项目一
- 说说&& 和 &的区别
- c++实验四-项目七
- getSession()和getCurrentSession()的区别及常见问题