msys2/msys2.github.io

The pacman command dosent work; gcc not found

GreenFishy opened this issue · 2 comments

Explination:
Hi! I was following the main page guide to installing the tools ' mingw-w64 GCC to start compiling'. The first time I ran the command it worked but gave a not found output when checking the gcc --version. I then tried again in reinstalling and it still gave the same error
on my second try to check. Then I closed the MSYS2 terminal and reopened and reran the command and all it does is reinstall and still gives the error.

System: Windows 11 Home 22H2 build

Steps to produce:

  1. Install Msys2 (default parameters)
  2. Open the Msys2 terminal
  3. Run the command pacman -S mingw-w64-ucrt-x86_64-gcc -y
  4. Check the version with gcc --version
  5. Returns error not found

Side notes:
1.Windows defender sees no issues
2. Please let me know if there was a issue template I didn't see one when clicking on issue reporting.

Use the UCRT64 launcher.

Kistor commented

Hi, i have this problem.
Let's check your environment variables. You shoud input in PATH some this C:\msys64\ucrt64 (directory with g++/gcc.exe), and restart your copmputer. This helped me