MSYS2 won't install

My OS is Windows version is 22H2 (25284.1000). And MSYS2 won’t install. I know that you guys aren’t responsible for MSYS2, but perhaps some of you have encountered the same problem and know a solution! =)

At 50%, I get a message. Since I am a German, this translation might be not so correct: (Message Box)

"Error while installing component com.msys2.root: Execution failed (Unexpected exit code: 254): “C:/msys64\usr\bin\bash.exe --login -c exit”

Tried “Repeat”, but didn’t work. “Ignore” leads to this:

(Console window “MSYS2 UCRT64 Shell” opens)

Content:

Error: Could not fork child process: Resource temporarily not available (-1). DLL rebasing may be required; see 'rebaseall / rebase --help".

Any ideas?

No expert here, but … sure you got the latest and greatest installer ?

https://github.com/msys2/msys2-installer/releases/download/2023-01-27/msys2-x86_64-20230127.exe

and followed the rules:

Installation Folder (short ASCII-only path on a NTFS volume, no accents, no spaces, no symlinks, no subst or network drives, no FAT).

1 Like

Be sure:

  • You have admin rights (required to install into C:\msys64 folder).
  • Disable (during install) your firewall.
  • Don’t use backslash ** but slash / instead, for paths.

When installed, allow rules are required for .exeS (executables who need connection, like git.exe etc) in your firewall.

Interesting… :wink:

(I have downloaded mine from www.msys2.org couple of week ago, also previous versions)

@Jens.Peter.Nielsen msys64 is a valid folder name (I have used D:\msys64)

Surely OP have both folder rights & firewall blockings.

I didn’t read properly - it’s right there “C:/msys64\usr\bin\bash.exe --login -c exit” :face_holding_back_tears:

1 Like

Yes, of course. No folder with the same name, firewall deactivated, executed the installer as administrator.

Ah yep… perhaps msys2 doesn’t like slashes and backslashes!

Slashes / are working, I’m always using cd /d/RackDev/plugins/Ohmer (as example) since four years.

Also: this Unix-like terminal is case sensitive!

Perhaps try running the msys installer from powershell with "--verbose"

PS G:\Downloads> .\msys2-x86_64-20230127.exe --verbose
IFW Version: 4.5.0, built with Qt 5.15.7.
Build date: Nov 21 2022
Installer Framework SHA1: fd24bf3955be8e71cd331dd0b4cccd4f1a912b3c
[0] Arguments: G:\Downloads\msys2-x86_64-20230127.exe, --verbose
[4] Operations sanity check succeeded.
[9] Using metadata cache from "C:/Users/jpn99/AppData/Local/cache\\qt-installer-framework\\d75f1c19-3379-3717-ae8d-1404b51494a9"
[10] Found 0 cached items.
[10] Language: en-GB
[47] Loaded control script ":/metadata/installer-config/control_js.js"
[47] Using control script: ":/metadata/installer-config/control_js.js"
[4801] Fetching latest update information...
[4806] Loading component scripts...
[27381] backup  operation: Mkdir
[27382]         - arguments: H:/msys64_02
[27382] Done
[27382] perform  operation: Mkdir
[27382]         - arguments: H:/msys64_02
[27382] Done
[27383] Preparing the installation...
[27383] Install size: 1 components
[27386] Preparing to unpack components...
[27386] backup com.msys2.root concurrent operation: Extract
[27387]         - arguments: installer://com.msys2.root/20230127msys64.7z, H:/msys64_02
[27387] Started
[27558] Unpacking components...
[27559] perform com.msys2.root concurrent operation: Extract
[27560]         - arguments: installer://com.msys2.root/20230127msys64.7z, H:/msys64_02
[27560] Started
[37072] Installing component MSYS2
[37074] backup com.msys2.root operation: CreateShortcut
[37074]         - arguments: H:/msys64_02/mingw32.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 MINGW32.lnk, iconPath=H:/msys64_02/mingw32.exe
[37075] Done
[37075] perform com.msys2.root operation: CreateShortcut
[37076]         - arguments: H:/msys64_02/mingw32.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 MINGW32.lnk
[37098] Done
[37099] backup com.msys2.root operation: CreateShortcut
[37100]         - arguments: H:/msys64_02/mingw64.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 MINGW64.lnk, iconPath=H:/msys64_02/mingw64.exe
[37103] Done
[37103] perform com.msys2.root operation: CreateShortcut
[37105]         - arguments: H:/msys64_02/mingw64.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 MINGW64.lnk
[37115] Done
[37116] backup com.msys2.root operation: CreateShortcut
[37118]         - arguments: H:/msys64_02/ucrt64.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 UCRT64.lnk, iconPath=H:/msys64_02/ucrt64.exe
[37121] Done
[37121] perform com.msys2.root operation: CreateShortcut
[37123]         - arguments: H:/msys64_02/ucrt64.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 UCRT64.lnk
[37135] Done
[37136] backup com.msys2.root operation: CreateShortcut
[37137]         - arguments: H:/msys64_02/clang64.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 CLANG64.lnk, iconPath=H:/msys64_02/clang64.exe
[37141] Done
[37141] perform com.msys2.root operation: CreateShortcut
[37142]         - arguments: H:/msys64_02/clang64.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 CLANG64.lnk
[37153] Done
[37154] backup com.msys2.root operation: CreateShortcut
[37155]         - arguments: H:/msys64_02/clangarm64.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 CLANGARM64.lnk, iconPath=H:/msys64_02/clangarm64.exe
[37158] Done
[37159] perform com.msys2.root operation: CreateShortcut
[37160]         - arguments: H:/msys64_02/clangarm64.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 CLANGARM64.lnk
[37171] Done
[37171] backup com.msys2.root operation: CreateShortcut
[37173]         - arguments: H:/msys64_02/msys2.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 MSYS.lnk, iconPath=H:/msys64_02/msys2.exe
[37176] Done
[37176] perform com.msys2.root operation: CreateShortcut
[37177]         - arguments: H:/msys64_02/msys2.exe, C:\Users\jpn99\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2_02/MSYS2 MSYS.lnk
[37189] Done
[37189] backup com.msys2.root operation: Execute
[37190]         - arguments: H:/msys64_02\usr\bin\bash.exe, --login, -c, exit
[37191] Done
[37192] perform com.msys2.root operation: Execute
[37193]         - arguments: H:/msys64_02\usr\bin\bash.exe, --login, -c, exit
[37216] H:/msys64_02\\usr\\bin\\bash.exe" started, arguments: "--login -c exit
[37530] Copying skeleton files.\nThese files are for the users to personalise their msys2 experience.\n\nThey will never be overwritten nor automatically updated.\n\n'./.bashrc' -> '/home/jpn99/.bashrc'\n
[37545] './.bash_logout' -> '/home/jpn99/.bash_logout'\n
[37557] './.bash_profile' -> '/home/jpn99/.bash_profile'\n
[37568] './.inputrc' -> '/home/jpn99/.inputrc'\n
[37580] './.profile' -> '/home/jpn99/.profile'\n
[37652] 'C:\\WINDOWS\\system32\\drivers\\etc\\hosts' -> '/etc/hosts'\n
[37685] 'C:\\WINDOWS\\system32\\drivers\\etc\\protocol' -> '/etc/protocols'\n
[37717] 'C:\\WINDOWS\\system32\\drivers\\etc\\services' -> '/etc/services'\n
[37750] 'C:\\WINDOWS\\system32\\drivers\\etc\\networks' -> '/etc/networks'\n
[38415] ==> Generating pacman master key. This may take some time.\n
[39059] ==> Updating trust database...\n==> Appending keys from msys2.gpg...\n
[39693] ==> Locally signing trusted keys in keyring...\n
[40005]   -> Locally signed 5 keys.\n==> Importing owner trust values...\n==> Disabling revoked keys in keyring...\n
[40320]   -> Disabled 4 keys.\n==> Updating trust database...\n
[48598] \x1B[H\x1B[2J\x1B[3J\n\n###################################################################\n#                                                                 #\n#
                                          #\n#                   C   A   U   T   I   O   N                     #\n#                                                                 #\n#
        This is first start of MSYS2.                  #\n#       You MUST restart shell to apply necessary actions.        #\n#                                                                 #\n#                                                                 #\n###################################################################\n\n\n\x1B[H\x1B[2J\x1B[3J
[48611] Done
[49477] Warning: DirectWrite: CreateFontFaceFromHDC() failed (Indicates an error in an input file such as a font file.) for QFontDef(Family="8514oem", pointsize=8.25, pixelsize=20, styleHint=5, weight=50, stretch=100, hintingPreference=0) LOGFONT("8514oem", lfWidth=0, lfHeight=-20) dpi=144
[49499] Writing maintenance tool: "H:/msys64_02/uninstall.exe.new"
[49501] Writing maintenance tool.
[49703] Wrote permissions for maintenance tool.
[49729] Maintenance tool hard restart: false.
[49731] Installation finished!
[| 100%]

Are you running a third-party anti-virus program, or just using the built-in Defender?

Also, when you run the installer, try and run it by right-clicking on it and select “Run as administrator”.

You need to uninstall fisrt MSYS2, after look if the folder is still on your PC and delete it. Then restart your PC and finally install a fresh MSYS2 with administrator rigth… it should works…

It has been a long time since I used MSYS2 (64-bit as 32-bit had issues with allocation of memory at the time), maybe it will migrate to WSL in the future, but today? @Caecos says right. If there are still issues, then something very strange is going on.

Was there ever a solution to this?

I am running the latest installer (April 7th 2023) as administrator, my firewall is off, my anti-virus is disabled, the folder is in my “root” directory using the default folder name - C:/msys64/ I have also tried restarting and shutting down my PC. Windows 10 22H2.

PowerShell install log below

PS B:\Users\Red\Programs> .\msys2-x86_64-20230526.exe --verbose
IFW Version: 4.5.2, built with Qt 5.15.8.
Build date: Apr  7 2023
Installer Framework SHA1: 659addd6ba5862b7c21a31fae4b7856d6cc9d58f
[0] Arguments: B:\Users\Red\Programs\msys2-x86_64-20230526.exe, --verbose
[13] Operations sanity check succeeded.
[21] Using metadata cache from "C:/Users/Red/AppData/Local/cache\\qt-installer-framework\\d75f1c19-3379-3717-ae8d-1404b51494a9"
[22] Found 0 cached items.
[22] Language: en-US
[55] Loaded control script ":/metadata/installer-config/control_js.js"
[55] Using control script: ":/metadata/installer-config/control_js.js"
[3625] Fetching latest update information...
[3630] Loading component scripts...
[7585] backup  operation: Mkdir
[7585]  - arguments: C:/msys64
[7585] Done
[7585] perform  operation: Mkdir
[7585]  - arguments: C:/msys64
[7586] Done
[7586] Preparing the installation...
[7586] Install size: 1 components
[7590] Preparing to unpack components...
[7590] backup com.msys2.root concurrent operation: Extract
[7590]  - arguments: installer://com.msys2.root/20230526msys64.7z, C:/msys64
[7590] Started
[7917] Unpacking components...
[7919] perform com.msys2.root concurrent operation: Extract
[7919]  - arguments: installer://com.msys2.root/20230526msys64.7z, C:/msys64
[7919] Started
[15002] Installing component MSYS2
[15005] backup com.msys2.root operation: CreateShortcut
[15005]         - arguments: C:/msys64/mingw32.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 MINGW32.lnk, iconPath=C:/msys64/mingw32.exe
[15005] Done
[15006] perform com.msys2.root operation: CreateShortcut
[15008]         - arguments: C:/msys64/mingw32.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 MINGW32.lnk
[15033] Done
[15034] backup com.msys2.root operation: CreateShortcut
[15036]         - arguments: C:/msys64/mingw64.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 MINGW64.lnk, iconPath=C:/msys64/mingw64.exe
[15042] Done
[15043] perform com.msys2.root operation: CreateShortcut
[15045]         - arguments: C:/msys64/mingw64.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 MINGW64.lnk
[15057] Done
[15058] backup com.msys2.root operation: CreateShortcut
[15060]         - arguments: C:/msys64/ucrt64.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 UCRT64.lnk, iconPath=C:/msys64/ucrt64.exe
[15067] Done
[15068] perform com.msys2.root operation: CreateShortcut
[15071]         - arguments: C:/msys64/ucrt64.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 UCRT64.lnk
[15085] Done
[15086] backup com.msys2.root operation: CreateShortcut
[15088]         - arguments: C:/msys64/clang64.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 CLANG64.lnk, iconPath=C:/msys64/clang64.exe
[15096] Done
[15097] perform com.msys2.root operation: CreateShortcut
[15099]         - arguments: C:/msys64/clang64.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 CLANG64.lnk
[15112] Done
[15113] backup com.msys2.root operation: CreateShortcut
[15116]         - arguments: C:/msys64/clangarm64.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 CLANGARM64.lnk, iconPath=C:/msys64/clangarm64.exe
[15123] Done
[15124] perform com.msys2.root operation: CreateShortcut
[15127]         - arguments: C:/msys64/clangarm64.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 CLANGARM64.lnk
[15140] Done
[15141] backup com.msys2.root operation: CreateShortcut
[15143]         - arguments: C:/msys64/msys2.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 MSYS.lnk, iconPath=C:/msys64/msys2.exe
[15150] Done
[15151] perform com.msys2.root operation: CreateShortcut
[15154]         - arguments: C:/msys64/msys2.exe, C:\Users\Red\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MSYS2/MSYS2 MSYS.lnk
[15167] Done
[15168] backup com.msys2.root operation: Execute
[15171]         - arguments: C:/msys64\usr\bin\bash.exe, --login, -c, exit
[15174] Done
[15175] perform com.msys2.root operation: Execute
[15177]         - arguments: C:/msys64\usr\bin\bash.exe, --login, -c, exit
[15184] C:/msys64\\usr\\bin\\bash.exe" started, arguments: "--login -c exit
      0 [main] bash 1380 dofork: child -1 - forked process 12904 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
1078660 [main] bash 1380 dofork: child -1 - forked process 15020 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
3159251 [main] bash 1380 dofork: child -1 - forked process 14512 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
7213133 [main] bash 1380 dofork: child -1 - forked process 2176 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
15290908 [main] bash 1380 dofork: child -1 - forked process 19824 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
[30590] Warning:       0 [main] bash 1380 dofork: child -1 - forked process 12904 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
/etc/profile: fork: retry: Resource temporarily unavailable
1078660 [main] bash 1380 dofork: child -1 - forked process 15020 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
/etc/profile: fork: retry: Resource temporarily unavailable
3159251 [main] bash 1380 dofork: child -1 - forked process 14512 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
/etc/profile: fork: retry: Resource temporarily unavailable
7213133 [main] bash 1380 dofork: child -1 - forked process 2176 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
/etc/profile: fork: retry: Resource temporarily unavailable
15290908 [main] bash 1380 dofork: child -1 - forked process 19824 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
/etc/profile: fork: Resource temporarily unavailable

[30635] Done
[30636] Operation \"Execute\" with arguments \"@TargetDir@\\usr\\bin\\bash.exe; --login; -c; exit\" failed: Execution failed (Unexpected exit code: 254): \"C:/msys64\\usr\\bin\\bash.exe --login -c exit\"
[30644] installationErrorWithCancel : Installer Error : Error during installation process (com.msys2.root):

I assume you tried the “normal” thing of double clicking on the installer to run it? Also, installing as admin is not necessary. I don’t think. Never had a problem, but that’s always how it is with these things, right?

@idaho, I would try installing using cmd.exe instead of powershell. Probably just superstition :sunglasses: . . .

and check the windows security settings, (mandatory ASLR).

1 Like