#-bash gcc command not found error
1 messages · Page 1 of 1 (latest)
Did you make sure to install it first?
Also, do you know if you need mingw64 or would ucrt64 be fine or do you not know?
then you need to run pacman -S mingw-w64-x86_64-gcc
Same error, Win11, updated, after installing the ming with pacman the path is not set.
And this instruction is on the main page of the msys website, I expect at least to work as they state.
you didn't read the instructions properly
the gcc package is not the same as mingw-w64-x86_64-gcc is not the same as mingw-w64-ucrt-x86_64-gcc etc
and you need to be in the matching msys2 environment
I should say I am now intimidated for all what is needed, but, I'm just following the instructions on the web portal for a clean installation...
I appreciate you are providing help, but It don't make sense. The web portal has very simple installation instructions for MSYS
I will explain step by step what I am doing, based on my reading of the web portal
1-Download the installer: msys2-x86_64-20230318.exe, run the installer.
2-Accept defaults, it goes to C:\msys64
3-The terminal windows open at the end of the installation.
4-type pacman -S mingw-w64-ucrt-x86_64-gcc into the console, hit Y when prompted
it installs properly
and are you in the ucrt terminal?
5-following the instructions in clear on the portal type $ gcc --version just to check the program... bam! not found
so... the main page, the portal, it just give me trash instructions...
no, you just need to read it carefully
the window that opens is UCRT, but the instructions tell you to run gcc .... it will never run, it was never downloaded
the one that downloaded was g++.exe
I think there is little room for interpretation ....
Now you can call gcc to build software for Windows.
$ gcc --version
gcc.exe (Rev1, Built by MSYS2 project) 12.2.0
so /ucrt64/bin/g++.exe exists but /ucrt/bin/gcc.exe does not?
and what does which gcc print?
i don't know, I can't run it from inside the uscrt terminal ...
yes you can
I see it on the Windows File manager,
Ok, if there is another guide that explains what to do I am willing to read
in my case i do not have ucrt gcc installed as i don't use this env, but in mingw64 i do
good
it should print /ucrt64/bin/gcc for you
Pedro Farías@MXTJMPLAPA1007 MINGW64 /
$ which gcc
which: no gcc in (/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Pedro Farías@MXTJMPLAPA1007 MINGW64 /
it is .... 😦 😦
your prompt says MINGW64
I was on the first menu, msys2 64bit
now I closed that and went into UCRT x64, and there is
the latest msys2 installer should have opened a ucrt terminal by default
Pedro Farías@MXTJMPLAPA1007 UCRT64 ~
$ gcc --version
gcc.exe (Rev2, Built by MSYS2 project) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
finally
It works now, I don't know how, but it works
Thank you.
you should read through this
https://www.msys2.org/docs/environments/