Msys2 install error on Windows 8

Hi guys,

I was just trying to install on a Windows 8 laptop with the msys2 installer that I just downloaded today. I run into issues very quickly actually, while installing dependencies. Git, Python, and pkg-config install fine, but all of the mingw-* packages I get the following issues:

C:\msys64>usr\bin\pacman -S mingw-w64-x86_64-eigen3
resolving dependencies...
looking for conflicting packages...

Packages (1) mingw-w64-x86_64-eigen3-3.2.8-1

Total Download Size:   0.50 MiB
Total Installed Size:  3.46 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 mingw-w64-x86_64-ei...   515.9 KiB  63.0M/s 00:00 [#####################] 100%
(1/1) checking keys in keyring                     [#####################] 100%
(1/1) checking package integrity                   [#####################] 100%
(1/1) loading package files                        [#####################] 100%
(1/1) checking for file conflicts                  [#####################] 100%
error: failed to commit transaction (conflicting files)
mingw-w64-x86_64-eigen3: /mingw64 exists in filesystem
Errors occurred, no packages were upgraded.

(Giving just the example of eigen3 as it’s shortest).

I’m sure I’m in the correct shell window - despite that I get the same error using the msys2 and other shells…

gcc and eigen are definitely missing, because the ./configure command can’t find any gcc - nor can my a find command. Any suggestions on what stupid thing I’m missing??

Thanks,
Sjoerd

Hey Sjoerd,

First thing that comes to mind is the hoops that you have to jump through these days when initially setting up a fresh MSYS2 installation. In particular (at least last time I did it) there’s one point where you have to manually alter the command-line options for the shell shortcuts - there’s a chance that these may relate to how root / system directories are set up / mounted. I’d suggest uninstalling and starting the install process from scratch, and make sure you pay very close attention to the (rather unceremonious yet vital) instructions it gives regarding closing & restarting terminals and altering shortcuts. If you can reproduce an install process that definitely follows every instruction (both from MSYS2 and MRtrix3) to the letter but still stumbles, then we’ll need to take a closer look.

Good luck!
Rob

Hi,

I had exactly the same problem as Sjoerd when trying to install the mingw-* packages in Msys2 on Windows 10.
I resolved it by following the solution suggested on the Msys2 Sourceforge installation page (section V.4):

4.Sometimes a package upgrade fails with failed to commit transaction (conflicting files) and some-pkg: /path/to/some/file exists in filesystem. If you’re sure you didn’t put the offending files there manually, move or delete the files and start the upgrade again.

So, I renamed the files C:/msys64/mingw64.exe and C:/msys64/mingw64.ini into something else (say C:/msys64/mingw64.exe.bck and C:/msys64/mingw64.ini.bck) and the package installation worked…

The problem seems to be due to the package install needing to create a msys64 folder, but thinking it already exists because of either mingw64.exe and mingw64.ini, or both.

I then renamed the two files back to their original names.

2 Likes

Thanks Julien, that did the trick. It was indeed an issue of temporarily renaming those files. My msys2 version was dated 20160921 so anyone running into similar issues with this version should have the same solution.

Sjoerd

That is some serious detective work! Thanks for this, we should add a mention about this to the documentation.

I’ve been hoping that the MSYS2 maintainers might update their installer for some time now, but not much has happened… This does make installation very fiddly and error-prone unfortunately. I’m not too sure how to deal with this - or indeed, whether there’s anything we can realistically do about this in the near future. Any suggestions most welcome!