for MSYS2
User@ThisPC MINGW64 ~/Code/command-not-found-msys2
$ gcc
bash: gcc: command not found
→ 'gcc.exe' is provided by:
- mingw64/mingw-w64-x86_64-gcc [15.2.0-8]
mingw64/bin/gcc.exe
- msys/gcc [15.2.0-1]
usr/bin/gcc.exego run github.com/raffleberry/command-not-found-msys2@latest install
or
Download from releases, then run cnf.exe install from inside MSYS2