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?
|
Code:
sudo apt-get update I'm assuming you'll need to install it, I have Mint 18.1 and didn't have the command, but was able to install it. EDIT: @bw-userx there is no dos2linux, ... Unix. |
dos2unix – Removing Hidden Windows Characters from Files
I was close. :D off by a few letters. |
BW-userx,
It might, but I'm not willing to go through 1,883 lines to see every file used (with the risk of missing one). First, I'll see what Canon Support will do... |
Quote:
Code:
find . -name "*" -exec dos2unix {} \; |
rtmistler,
Install would probably work on Intel, but I have a 64 bit AMD Athelon X2 and install of dos2unix fails with “error processing package libjpeg62:amd64 package is in a very bad inconsistent state”. And the packages are one directory while resource files are in another. Not that it matters since do2unix install fails. |
Quote:
Code:
cd into directory which ever completes first with good usable files, use them |
rtmistler & BW-userx,
Calling it a day after 12 hours fiddling with Mint (but did get "shutdown" issue fixed0. Will pick it up circa 0430 tomorrow morning. rtmistler, Any thoughts on my install issue? Have latest version of "amd64-microcode" installed. Bye for now... |
I too had to install it on my brand-new desktop (AMD E-350 Processor, 2 cores) - but I thought you already had it...you ran it against the script as in post #8, yes?
|
scasey,
No, I cheated. When dos2unix wouldn't install I copied it to a USB stick then used UltraEdit under Windows to convert DOS to Unix and then saved the result. I run 3 PCs under Windows 7 Pro, 1 on XP Pro, 1 on Win10 (which I loathe) and a MacBookPro 15 under Sierra 10.12.6; all on both a 100GHz Ethernet LAN and an 802.11agnac WiFi net. I used a memory stick because I only put the Linux machine on my Ethernet when I want to download a driver or other package (because I have to steal the RG-45 cable from a Win7 laptop). |
Once again, I direct folks' attention to https://www.linuxquestions.org/quest...ml#post5805778 where someone successfully used that script a month ago here on LQ.
Looks like corruption at some point. |
hydrurga,
Yes it was corruption. Canon Support asked me to visit the site again and sure enough the "Operating System" on the Drivers download page said “Windows 7 (detected)”. They advised manually changing that to be “Linus 64bit” then download again. Voilŕ! The debian package worked without errors and my Canon TS6020 is now installed and working. When asked why their page misidentified my environment their answer was just "It may be your browser or a system setting." I'd have liked a more definitive answer, but their advice got me working. |
talk about passing the buck, I'm surprised you didn't get,the defacto,
"It's not my department, mam/sir" |
BW-userx,
The “pass the buck” response arrived today via emai. It came from a support guy other than the one with whom spoke: Code:
On 2/10/2018 7:37 AM, Canon Support wrote: |
All times are GMT -5. The time now is 04:53 PM. |