9

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?

2
  • How are you updating MSYS2? Note that in the article MSYS2 installation, section Updating packages, there are two alternative methods, so perhaps the other will work better. – harrymc Sep 19 '18 at 8:07
  • 1
    What repositories do you have enabled within msys2 64-bit shell you - if you do pacman -Syu what does it return there? I would recommned using scoop for msys2 installation and updates. – tukan Sep 23 '18 at 17:51
8

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. :)

2
  • Thank you very much. Sorry for the late accept. – jww Dec 27 '18 at 1:10
  • I've opened a PR to disable the installation-maintenance features and leave only complete removal, as that's the only thing the tool is intended to be used for. (It'll also be created as Uninstall_MSYS2.exe, so you won't need to leave reminders for yourself.) – FeRD Apr 28 at 12:32
2

Too long post to be a comment so I'm posting it as answer. If you do the pacman -Syu what do you get? Do you get any repositories?

You should get some like in my case:

$ pacman -Syu
:: Synchronizing package databases...
 mingw32                  485.9 KiB   576K/s 00:01 [#####################] 100%
 mingw32.sig              119.0   B  0.00B/s 00:00 [#####################] 100%
 mingw64                  486.8 KiB   956K/s 00:01 [#####################] 100%
 mingw64.sig              119.0   B  0.00B/s 00:00 [#####################] 100%
 msys                     171.6 KiB  1016K/s 00:00 [#####################] 100%
 msys.sig                 119.0   B  0.00B/s 00:00 [#####################] 100%
:: Starting core system upgrade...
warning: terminate other MSYS2 programs before proceeding
resolving dependencies...
looking for conflicting packages...

Packages (2) msys2-runtime-2.11.1-2  msys2-runtime-devel-2.11.1-2

Total Download Size:    7.00 MiB
Total Installed Size:  40.27 MiB
Net Upgrade Size:       0.73 MiB

:: Proceed with installation? [Y/n]

Do you get similar response when using msys2 shell?

As I wrote already in comment I recommended using scoop to install msys2.

1
  • Thank you very much. Sorry for the late upvote. – jww Dec 27 '18 at 1:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.