`

-sh: 27: source: not found

阅读更多
ubuntu12.04中shell脚本无法使用source的原因及解决方法

执行命令:source ./.bashrc 提示错误信息:-sh: 27: source: not found



原因: ls -l `which sh` 提示/bin/sh -> dash

这说明是用dash来进行解析的。

改回方法:
命令行执行:sudo dpkg-reconfigure dash
在界面中选择no

再ls -l `which sh` 提示/bin/sh -> bash


修改成功,source可以用了~

备注:最好是重新登录后再执行source命令
分享到:
评论

相关推荐

    解决docker CMD/ENTRYPOINT执行sh脚本报: not found/run.sh:

    Dockerfile配置没有问题,为什么执行ENTRYPOINT...最近通过Dockerfile编写镜像,CMD中调用的是sh脚本(start.sh)进行启动容器,通过docker run启动时,启动不成功,进行docker logs 容器ID,发现报错为:未预期的符

    /bin/sh: python: not found 问题的解决

    原因 python 可能被 python2 或者 python 3 代替了导致映射不到。 解决方法 命令行执行: ls -l /usr/bin/python* 然后会出现: lrwxrwxrwx 1 root root 9 3月 16 09:09 /usr/bin/python3 -> python3.6 ...

    2009 达内Unix学习笔记

    ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ 一、注意事项 命令和参数之间必需用空格隔开,参数和参数之间也必需用空格隔开。 一行不能超过256个字符;大小写有区分。 二、特殊字符含义 文件名以“.”开头...

    bmi160调通bmi160的ACC+GYR_20160907.7z

    sh: getevnet: not found 127|shell@octopus-perf:/ # getevent -p add device 1: /dev/input/event5 name: "l3gd20_gyr" events: ABS (0003): 0000 : value 0, min -32768, max 32768, fuzz 0, flat 0, ...

    r58_evb_sc5806v4加载TP成功修改config 20160815 2026.7z

    /bin/sh: 1: arm-linux-gnueabi-arm-linux-gnueabi-gcc: not found make:进入目录'/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/build/linux2/sunxi_android' CC [M] /home/...

    android想用adb查看数据库 被告知inaccessible or not found怎么办

    通常,我们在进行数据库操作的时候,都想要查看数据库结果是否正确,这时候我们会用到adb。首先我们将adb加入环境变量 vi ~/.bash_profile 进入到vi模式开始修改 ...使环境变量生效,然后输入adb sh

    linux全志R16的linux系统编译的资料_20170502_1655.7z

    rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. ...

    mkvtoolnix_2.7.0

    source packages, not the binaries for Windows. They should be named libogg-1.0.tar.gz and libvorbis-1.0.tar.gz or something like that (don't mind the actual version number, it might be higher than ...

    vm安装macos补丁_unlock-all-v111

    error is shown during patching as the files are not found. This can be safely ignored. In all cases make sure VMware is not running, and any background guests have been shutdown. 2. Windows ------...

    ap6181调通SSH和SCP+ap6212a0_r16_tinav2.1.7z

    rootroot@rootroot-E400:~/wyb/ap6181+ap6212a0_r16_tinav2.1$ source build/envsetup.sh including target/allwinner/tulip-d1/vendorsetup.sh including target/allwinner/azalea-evb/vendorsetup.sh including ...

    linux 下 带shell功能ftp源代码

    sh: get: command not found Walle> 3 run client side local shells [usage] :! cmd [return]: return what the shell will return to stdout and stderr . [eg] : Walle>!ls /root a es OperaDownloads ...

    vmware8 mac补丁

    error is shown during patching as the files are not found. This can be safely ignored. In all cases make sure VMware is not running, and any background guests have been shutdown. 2. Windows ------...

    VMware Unlocker for OS X 1.1.0

    error is shown during patching as the files are not found. This can be safely ignored. In all cases make sure VMware is not running, and any background guests have been shutdown. 2. Windows --------...

    AAPT: error: resource attr/** (aka com.**.app:attr/**) not found.

    问题记录 记录项目中的一个问题,不知什么时候,运行项目会出现这个错误: 解决方法 buildscript { repositories { google() jcenter() } dependencies { //之前使用的是3.5.2版本,升级成3.6.2后就出现了...

    linux 下 结合ftp 和部分telnet 功能的服务器源码

    sh: get: command not found Walle> 3 run client side local shells [usage] :! cmd [return]: return what the shell will return to stdout and stderr . [eg] : Walle>!ls /root a es ...

    结合telnet与ftp 功能服务器wasd第三版源码

    sh: get: command not found Walle> 3 run client side local shells [usage] :! cmd [return]: return what the shell will return to stdout and stderr . [eg] : Walle>!ls /root a es ...

    Miniforge3-MacOSX-arm64

    Miniforge3-MacOSX-arm64

    nginx+tomcat高可用、高性能jsp集群

    #INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jdk1.6.0_25/jre/lib/i386/client:/usr/...

    netbeans-8.0-cpp-windows.exe

    Use the provided uninstaller found at /netbeans-install-directory/uninstall.sh. Do not manually delete the directories and files. To uninstall the IDE (Mac OS X) Drag the program folders or files to...

    (重要)AIX command 使用总结.txt

    当再次尝试远程登录时, 系统报错:Remote logins are not allowed for this account, 表示修改成功 //如何自动logout用户 有的用户登录后就长时间空闲,有可能导致安全上的问题,通过打开 /etc/profile 中 TMOUT 注释,...

Global site tag (gtag.js) - Google Analytics