Discussion:
cannot execute binary file
Gerry Reno
2013-12-16 22:55:31 UTC
Permalink
/usr/bin/ls: /usr/bin/ls: cannot execute binary file
/bin/bash: Exit 126


This is the error that greets me when I try to execute a command in cygwin from a Windows Command Prompt like so:

C:\cygwin\bin\mintty.exe -h always /bin/bash -l ls

This was after installing a new version of Cygwin today. So I wiped it and installed it again and got the same error again.

This used to work because I've called my own scripts this way before. Is there some new way of doing this?
Max Polk
2013-12-17 00:27:44 UTC
Permalink
Post by Gerry Reno
/usr/bin/ls: /usr/bin/ls: cannot execute binary file
/bin/bash: Exit 126
C:\cygwin\bin\mintty.exe -h always /bin/bash -l ls
This was after installing a new version of Cygwin today. So I wiped it and installed it again and got the same error again.
This used to work because I've called my own scripts this way before. Is there some new way of doing this?
If you provide a "minus c" option, it will work:

C:\cygwin\bin\mintty.exe -h always -e /bin/bash -l -c ls
Gerry Reno
2013-12-17 00:32:07 UTC
Permalink
Post by Max Polk
Post by Gerry Reno
/usr/bin/ls: /usr/bin/ls: cannot execute binary file
/bin/bash: Exit 126
C:\cygwin\bin\mintty.exe -h always /bin/bash -l ls
This was after installing a new version of Cygwin today. So I wiped it and installed it again and got the same error
again.
This used to work because I've called my own scripts this way before. Is there some new way of doing this?
C:\cygwin\bin\mintty.exe -h always -e /bin/bash -l -c ls
I just tried it with -c and all it gives you is a totally blank window.

Tried a bunch of other commands using the -c and same thing. Just a blank window.

Thanks for the suggestion though.
Larry Hall (Cygwin)
2013-12-17 02:39:37 UTC
Permalink
Post by Gerry Reno
Post by Max Polk
Post by Gerry Reno
/usr/bin/ls: /usr/bin/ls: cannot execute binary file
/bin/bash: Exit 126
C:\cygwin\bin\mintty.exe -h always /bin/bash -l ls
This was after installing a new version of Cygwin today. So I wiped it and installed it again and got the same error
again.
This used to work because I've called my own scripts this way before. Is there some new way of doing this?
C:\cygwin\bin\mintty.exe -h always -e /bin/bash -l -c ls
I just tried it with -c and all it gives you is a totally blank window.
Tried a bunch of other commands using the -c and same thing. Just a blank window.
In that case, there's something in your installation that isn't quite right.
The above suggestion resolves the issue you described just fine for me. If
you're still experiencing the problem when you use the '-c' flag and need to
consult with the list further on this issue, I recommend following the
Post by Gerry Reno
Problem reports: http://cygwin.com/problems.html
--
Larry

_____________________________________________________________________

A: Yes.
Post by Gerry Reno
Q: Are you sure?
Post by Max Polk
A: Because it reverses the logical flow of conversation.
Post by Gerry Reno
Q: Why is top posting annoying in email?
Gerry Reno
2013-12-17 02:57:50 UTC
Permalink
Post by Larry Hall (Cygwin)
Post by Gerry Reno
Post by Max Polk
Post by Gerry Reno
/usr/bin/ls: /usr/bin/ls: cannot execute binary file
/bin/bash: Exit 126
C:\cygwin\bin\mintty.exe -h always /bin/bash -l ls
This was after installing a new version of Cygwin today. So I wiped it and installed it again and got the same error
again.
This used to work because I've called my own scripts this way before. Is there some new way of doing this?
C:\cygwin\bin\mintty.exe -h always -e /bin/bash -l -c ls
I just tried it with -c and all it gives you is a totally blank window.
Tried a bunch of other commands using the -c and same thing. Just a blank window.
In that case, there's something in your installation that isn't quite right.
The above suggestion resolves the issue you described just fine for me. If
you're still experiencing the problem when you use the '-c' flag and need to
consult with the list further on this issue, I recommend following the
Post by Gerry Reno
Problem reports: http://cygwin.com/problems.html
I just got finished installing Cygwin on another machine and this time the -c does work. So I went back and looked at
the original machine. There are 2 cygwin installations on that machine in different directories. I had forgotten that
Cygwin got installed a while back on this machine to support some app that needed it. So somehow having 2 different
installations breaks this mintty -e capability. Does this qualify as a bug? Is Cygwin supporting 2 independent
installations?
Andrey Repin
2013-12-17 09:32:35 UTC
Permalink
Greetings, Gerry Reno!
Post by Gerry Reno
I just got finished installing Cygwin on another machine and this time the -c does work. So I went back and looked at
the original machine. There are 2 cygwin installations on that machine in different directories. I had forgotten that
Cygwin got installed a while back on this machine to support some app that needed it. So somehow having 2 different
installations breaks this mintty -e capability. Does this qualify as a bug? Is Cygwin supporting 2 independent
installations?
It do support two _independent_ installations.
This means, each of them have no way to find out about existence of the other,
barring the full disk search.
Yours were not that independent. Likely, them both were listed in $PATH.


--
WBR,
Andrey Repin (***@yandex.ru) 17.12.2013, <13:31>

Sorry for my terrible english...
Tim Prince
2013-12-17 12:44:52 UTC
Permalink
Post by Andrey Repin
Greetings, Gerry Reno!
Post by Gerry Reno
I just got finished installing Cygwin on another machine and this time the -c does work. So I went back and looked at
the original machine. There are 2 cygwin installations on that machine in different directories. I had forgotten that
Cygwin got installed a while back on this machine to support some app that needed it. So somehow having 2 different
installations breaks this mintty -e capability. Does this qualify as a bug? Is Cygwin supporting 2 independent
installations?
It do support two _independent_ installations.
This means, each of them have no way to find out about existence of the other,
barring the full disk search.
Yours were not that independent. Likely, them both were listed in $PATH.
This thread reminded me that I faced the similar problem. Being lazy
and not figuring out how to include the path to cygwin1.dll when running
Intel VTune profiler, I copied the .dll to the existing PATH, thus
breaking the installation when next running setup.
--
Tim Prince
Gerry Reno
2013-12-17 16:27:32 UTC
Permalink
Post by Andrey Repin
Greetings, Gerry Reno!
Post by Gerry Reno
I just got finished installing Cygwin on another machine and this time the -c does work. So I went back and looked at
the original machine. There are 2 cygwin installations on that machine in different directories. I had forgotten that
Cygwin got installed a while back on this machine to support some app that needed it. So somehow having 2 different
installations breaks this mintty -e capability. Does this qualify as a bug? Is Cygwin supporting 2 independent
installations?
It do support two _independent_ installations.
This means, each of them have no way to find out about existence of the other,
barring the full disk search.
Yours were not that independent. Likely, them both were listed in $PATH.
This thread reminded me that I faced the similar problem. Being lazy and not figuring out how to include the path to
cygwin1.dll when running Intel VTune profiler, I copied the .dll to the existing PATH, thus breaking the installation
when next running setup.
I checked the PATH and I don't see any cygwin1.dll on the PATH:

C:\Documents and Settings\Administrator>which cygwin1.dll

which: no cygwin1.dll in (.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\W
bem)
Gerry Reno
2013-12-17 18:59:07 UTC
Permalink
Post by Gerry Reno
Post by Andrey Repin
Greetings, Gerry Reno!
Post by Gerry Reno
I just got finished installing Cygwin on another machine and this time the -c does work. So I went back and looked at
the original machine. There are 2 cygwin installations on that machine in different directories. I had forgotten that
Cygwin got installed a while back on this machine to support some app that needed it. So somehow having 2 different
installations breaks this mintty -e capability. Does this qualify as a bug? Is Cygwin supporting 2 independent
installations?
It do support two _independent_ installations.
This means, each of them have no way to find out about existence of the other,
barring the full disk search.
Yours were not that independent. Likely, them both were listed in $PATH.
This thread reminded me that I faced the similar problem. Being lazy and not figuring out how to include the path to
cygwin1.dll when running Intel VTune profiler, I copied the .dll to the existing PATH, thus breaking the installation
when next running setup.
C:\Documents and Settings\Administrator>which cygwin1.dll
which: no cygwin1.dll in (.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\W
bem)
I went and wiped BOTH of these Cygwin installations off the machine and went and installed 2 new installations in the
same directory locations and now both installations work when invoking mintty -e. So it might have been that one of the
installations was much older and was causing some problem with independent installations.
Continue reading on narkive:
Loading...