MSYS2 and “At least one valid and enabled repository required for this action to succeed.”

mingwmsys2package-management

I have separate MSYS2 32-bit and 64-bit installed on a Windows 8.1 test machine. MSYS2 was acquired from the MinGW-64 download page. Each installation has developer tools installed like GCC, Git, GDB, Make, etc.

I'm having trouble updating MSYS2. When I attempt to update components I receive "At least one valid and enabled repository required for this action to succeed":

enter image description here

Settings | Network is set to No proxy. Settings | Repositories has the default repositories:

enter image description here

The problem occurs with both MSYS2 32-bit and MSYS2 64-bit. It also occurs with when running maintenancetool.exe as an administrator and as a regular user.

As far as I know, nothing has changed since the time I installed MSYS or the various developer packages. The repositories are the same as they were.

Searching is not turning up expected results. I expected lots of hits with lots of suggestions but there's 5 results (which seems very odd).

Why am I encountering the error and how do I fix it?

Best Answer

The maintenancetool.exe is IMO undeniably a flat out a broken monstrosity that the msys2 DEV team (apparently 4 people in the entire WORLD) listed here on the MSYS2 Github repo:

4 DEVs with MSYS2 repo/project rights

should have yanked long ago, and part one of the answer is that it is simply not possible at this time to do ANYTHING with it except for a complete manual uninstall of the entire MSYS2.

I would never under any other circumstance actually post an official stack answer like this but it's sadly the truth and in this case, will save others a lot of time searching. I have myself wasted much time trying everything too, and yes, you can manually attempt to add repos for QT etc. but that is NOT a valid solution for what it was intended which is usually mingwin32/64/msys+ on a typical Windows install.

Instead, as only a partial answer, part two is that the only workaround I have found is to launch the shell, and because you WILL receive in use errors etc, I typically just jump to running:

   <DO>

1. pacman -Syu --force

2. <WAIT UNTIL PROMPTED WITH IN USE (IF CORE UPDATING) - CLICK X TO KILL SHELL/RELAUNCH/RERUN SAME ABOVE COMMAND AGAIN>

   <LOOP UNTIL IT REPORTS UP TO DATE>

Until the DEVs that committed this code then left it for the public as the PRIMARY face of the toolset broken like this for years decides to place WORKING code on the form that provides the functions as intended by the darn existing unwired GUI buttons/dropdowns/textboxes/etc. (make it a working GUI package management interface) do yourself a favor and do what I did to remind yourself next time and make the final step here to place a maintenancetool.exe.IS.BROKEN!!!.txt file right under it in the directory. :)