I face the same problem after I run
pacman -Syu
and update the msys2-runtime-devel msys2-runtime
from 3.6.1-4 to 3.6.2-1 on Windows 11. I tried all the suggestions from here, but problem still there even after many reboots! Finally, I notice that my git bash
always opens successfully, and I use Process Explorer to find the difference is msys-2.0.dll
which is include in msys2-runtime. So I downgrade msys2-runtime to 3.6.1-4, problem solved.
Windows cmd
to launch bash.set "MSYSTEM=MINGW64"
set "CHERE_INVOKING=1"
set "MSYS2_PATH_TYPE=inherit"
C:\MSYS2\usr\bin\bash.exe --login -i
cd /var/cache/pacman/pkg/
pacman -U ./msys2-runtime-devel-3.6.1-4-x86_64.pkg.tar.zst ./msys2-runtime-3.6.1-4-x86_64.pkg.tar.zst
Now, problem solved!