在Ubuntu系统中遇到“source: not found”的错误,通常发生在尝试使用source命令来执行一个脚本或配置文件时,但系统找不到指定的文件。以下是针对这一问题的详细解答: 1. 确认用户问题背景和环境 用户在Ubuntu系统的命令行环境中使用source命令时遇到了“source: not found”的错误。这通常发生在尝试读取并执行指定文件...
如何解决ubuntu系统下source: not found错误? 若在ubuntu系统下运行含有source命令的shell脚本时,出现source: not found错误,原因可能是shell的解释器不是bash,需把shell的解释器更改为bash。 请按以下步骤更改shell的解释器: 执行ls -l /bin/sh命令,若得到结果/bin/sh -> dash,则说明shell的解释器为dash。 执行dpk...
ubuntu系统下source: not found错误? 若在ubuntu系统下运行含有source命令的shell脚本时,出现source: not found错误,原因可能是shell的解释器不是bash,需把shell的解释器更改为bash。 什么是ubuntu系统? Ubuntu是一个由Canonical公司发布的以桌面应用为主的开源GNU/Linux操作系统,支持x86、amd64(即x64)和ppc架构。 请...
如何解决ubuntu系统下source: not found错误? 若在ubuntu系统下运行含有source命令的Shell脚本时,出现source: not found错误,原因可能是Shell的解释器不是bash,需把Shell的解释器更改为bash。 什么是ubuntu系统? Ubuntu是一个由Canonical公司发布的以桌面应用为主的开源GNU/Linux操作系统,支持x86、amd64(即x64)和ppc架构...
现象: shell脚本中source aaa.sh时提示 source: not found 原因: ls -l `which sh` 提示/bin/sh -> dash 这说明是用dash来进行解析的。 改回方法: 命令行执行:sudo dpkg-reconfigure dash 在界面中选择no 再ls -l `which sh` 提示/bin/sh -> bash ...
ubuntu系统shell 中source: not found错误 错误: shell脚本中含有source命令运行时提示 source: not found 测试: 运行ls -l /bin/sh 后显示/bin/sh -> dash 这说明是用dash来进行解析的。 解决方案: 命令行执行:dpkg-reconfigure dash(需要root权限)
若在 ubuntu 系统下运行含有 source 命令的 shell 脚本时,出现 source: not found 错误,原因可能是 ...
方法: 命令行执行:dpkg-reconfigure dash 在跳出的界面选NO 原因: Ubuntu是用dash来进行解析的,运行 ls -s /bin/sh 后显示 /bin/sh -> dash 可以验证 修改之后,再运行 ls -s /bin/sh 后显示 /bin/sh -> bash ,或者运行 ls -l 'which sh' ,看到变化,就说明修改成功了。
Ubuntu系统中,默认使用的shell是/bin/dash,它不支持source命令; #执行步骤 1.运行 ls -l /bin/sh 后显示/bin/sh -> dash 这说明是用dash来进行解析的 2.命令行执行:dpkg-reconfigure dash(需要root权限) 3.在界面中选择no 4.再运行ls -l /bin/sh 后显示/bin/sh -> bash...
报错:source: not found 原因:sh 和 bash 是不同的 shell,sh中没有 source 命令。所以用 sh 或者 ./ 运行的时候,会提示这个错误。 解决办法:sudo bash test.sh