Mint 18.3 cannot find shell script
I have a Canon "install" shell script which I am unable to run. Have used "chmod" to make it executable—confirmed by fact that "open" shows up the run, view, run in terminal popup. When I select Run in Terminal it says "No such file or directory". It makes no difference if I "cd" to the folder containing script or if I try to run it from Terminal by entering full path and file name. It is in a subdirectory of my Desktop folder and that folder name contains no spaces.
Any suggestions? |
There may be several possible explanations or issues.
The script may be running, but be calling another command which can't be found and therefore this is the source of the complaint. Your descriptions of verifying and running seem to be a mix of File Manager, or Desktop Shortcut forms as well as terminal entry. Can you post the output of "ls -l" of the directory where the script is, and indicate what filename the script is. Can you try to run it from within that directory, but show the exact output. It should indicate what command it is saying is the "No such file or directory" |
1 Attachment(s)
rtmistler,
I am definitely in the correct directory and the script is there, but a picture probably shows it best: |
First you didn't type it correctly, you mistyped the name as intall.sh.
Next you mistyped how to run it. When in that sub-directory, just run it as follows: Code:
./install.sh |
1 Attachment(s)
rtmistler,
First, check the "ls" the name was not mistyped. Second, I had previously tried it with the "this directory" prefix and that had zero effect. See this capture: |
that last photo, last message in that last photo, says hangup as if it tried to do something. what caused it to return a 'hangup' and not command not found, or file not there, message?
it might be due to something within that script that it is not finding. how did you get inside of a deb tar? deb's are compressed install tars. |
Well it was mistyped the first time, before you tried a sudo command modifier.
Still looking for the output of "ls -l" for the directory containing that script. It seems to be complaining of /bin/bash, and perhaps you do not have /bin/bash on your system, an "ls -l /bin/bash" output would be helpful to see. Can you post the first few lines of that install.sh script as well? |
The No such file or directory is (probably) caused by the #!/bin/bash line being terminated by a ^M
The file apparently contains Windows line ends (CRLF) Try this: Backup the script Convert the line ends Run the converted script Code:
cp -p install.sh install.sh.orig Let us know what happens |
This may be of use (series of posts from this post onwards):
https://www.linuxquestions.org/quest...ml#post5805778 |
1 Attachment(s)
rtmistler,
The directory content is visible in the first attachment, showing "install.sh" is definitely there and the run, view, run in Terminal pop up shows it is executable. However, here are the "ls"s and "run" you wanted (and, yes, user nancyn is member of adm): |
I agree with scasey that there may be a problem with the #!/bin/bash line.
However you have not done the additional things requested. Please double check those requests from my last post, #7. Just to be clear: Quote:
|
that and I'd definitely open up that install.sh script and take a look at what is going on inside of it.
dash or bash? |
scasey,
That almost got it. Shell script was in DOS/Windows format (courtesy of Canon). However, running it resulted in these errors: Code:
================================================== |
scasey & business kid,
Here is the shell script (as much as will fit): Code:
#!/bin/bash |
will dos2linux work on that?
|
All times are GMT -5. The time now is 09:01 AM. |