Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash Failed to run: /usr/bin/bash: Exit 126. Failed to run '/usr/bin/bash': Exec format error #1491

Open
HerbM opened this issue Nov 15, 2018 · 2 comments

Comments

@HerbM
Copy link

HerbM commented Nov 15, 2018

Cannot start shell

Console appears with following message displayed (almost unreadable due to colors):

  • How to troubleshoot? *
/usr/bin/bash: Exit 126.
Failed to run '/usr/bin/bash': Exec format error

Actions prior:

  1. Updated MSys2 using pacman last night
  2. Ran script from MSys2 "package list" page used to find package list.

Result:

  • Console closed and now won't start fully
  • Shortcut popup (mintty.exe) displays with shell choice
  • None of Bash MSys2, Mingw-w64 32 bit, or Mingw-w64 bit from shortcut work.
  • Running mintty.exe from it's directory (using PowerShell) gives same results, popup but shells fail with same error as above.
  • Running on Windows 7: Microsoft Windows [Version 6.1.7601] *
  • Version from mintty.exe * "product" and "file" of executable, and all *.exe and *.dll in the msys64\usr\bin directory where it lives:
Product File    FullName
------- ----    --------
2.9.3   2.9.3.0 C:\Build\msys64\usr\bin\mintty.exe 

Product  File     FullName
-------  ----     --------
2.11.1   2.11.1   C:\Build\msys64\usr\bin\msys-2.0.dll
1.0.2p   1.0.2p   C:\Build\msys64\usr\bin\msys-crypto-1.0.0.dll
1.15     1.15     C:\Build\msys64\usr\bin\msys-iconv-2.dll
0.19.8.1 0.19.8.1 C:\Build\msys64\usr\bin\msys-intl-8.dll
5.2.4    5.2.4    C:\Build\msys64\usr\bin\msys-lzma-5.dll
1.0.2p   1.0.2p   C:\Build\msys64\usr\bin\msys-ssl-1.0.0.dll
0.19.8.1 0.19.8.1 C:\Build\msys64\usr\bin\envsubst.exe
0.19.8.1 0.19.8.1 C:\Build\msys64\usr\bin\gettext.exe
1.15     1.15     C:\Build\msys64\usr\bin\iconv.exe
5.2.4    5.2.4    C:\Build\msys64\usr\bin\lzcat.exe
5.2.4    5.2.4    C:\Build\msys64\usr\bin\lzma.exe
5.2.4    5.2.4    C:\Build\msys64\usr\bin\lzmadec.exe
5.2.4    5.2.4    C:\Build\msys64\usr\bin\lzmainfo.exe
2.9.3    2.9.3.0  C:\Build\msys64\usr\bin\mintty.exe
0.19.8.1 0.19.8.1 C:\Build\msys64\usr\bin\ngettext.exe

FYI: Doesn't seem to be anything named bash*.exe or bash*.dll in the msys64 tree.

sh.exe and ash.exe seem to run but I don't know if run manually from the bin directory.

Running msys64\msys2_shell.cmd also fails with same error.

@HerbM HerbM changed the title Bash Failed to run Bash Failed to run: /usr/bin/bash: Exit 126. Failed to run '/usr/bin/bash': Exec format error Nov 15, 2018
@andrew-grechkin
Copy link
Contributor

As just an idea for your troubleshooting,
I had similar issue (as i remember) when I had something wrong in my windows environment variables (something like '*' symbol in one of env var). Check your environment for user and for system, or maybe even try creating fresh clean user and start msys there.

@cdqncn
Copy link

cdqncn commented Nov 6, 2020

仅作为您进行故障排除的一个主意,
当我在Windows环境变量中有问题(例如env var中的“ *”符号)时,我遇到了类似的问题(我记得)。检查用户和系统的环境,或者甚至尝试创建新的干净用户并在那里启动msys。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants