A shell script is software that executes commands. Shell scripts are primarily used to avoid tedious tasks. Instead of entering commands one after the other n times, you can construct a script to automate a series of instructions to be run one after the other. The /bin/sh is used to run the file with sh, a Bourne shell, or another comparable shell.
While using the fypll repository, you can confront the error “bin/sh: 1: source not: found” when you start activating that using the below command:
You will get:
We can resolve the above error in multiple ways and follow the suitable way for you.
The source is not a sh built-in; it is a bash built-in, and you’re using sh rather than bash. Try using bash instead of sh.
Replace “source ./activate” with “. ./activate”
Building an automatic setup script that modifies /etc/profile and $HOME/.profile if some paths aren’t exported, then automatically reload these by the below-mentioned command:
You will get:
It does not mean that the source file is not found; it means the source you are trying to access is not found, the source is a Bash built-in function, and the script isn’t run with bash
Instead of source, “.” is supported by some shells. So, you may attempt something like the below-mentioned syntax.
Instead of using the below command:
The /bin/sh is usually a shell attempting to imitate The Shell. For “sh,” many distributions utilize /bin/bash because it supports the source. However, the source is not supported by Ubuntu which uses /bin/dash. If you cannot edit the script, try changing the shell that executes it.
As a programmer or computer users, we encounter certain errors daily. While using the shell, we encounter different types of errors, one of the errors is “bin/sh: 1: source not: found”. You encounter this error when running the bash script using the “sh” shell. The most common cause of this error is discussed in this article, and the possible ways to resolve this error are also discussed. You can find help from this article while resolving your error.
2024 was the GenAI year. With new and more performant LLMs and a higher number…
Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…
Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…
At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…
I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…
Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…