MSYS2-pacman icon indicating copy to clipboard operation
MSYS2-pacman copied to clipboard

pacman -Syu breaks shell

Open DweebsUnited opened this issue 4 years ago • 5 comments

Following the exact steps on the wiki: https://www.msys2.org/

After running ´pacman -Syu´ the first time, it tells me to close the shell and restart.

After I close the shell, I am no longer able to start a new shell via the .cmd file, nor the .exe files.

At this point, my installation is completely useless. Additionally, trying to uninstall after such a failure results in broken files that I have to restart Windows to clear.

I have tried solutions like #38 by first only updating the ´msys2-runtime´, but this package seems to be the one causing the problem.

Is there a new way of starting a shell that is not yet on the installation guides?

DweebsUnited avatar May 19 '20 15:05 DweebsUnited

Edit: is this the correct repo? The last commit is from 2016

Having the same problem and just crashed my installation again after finding #38 to reproduce the exact steps and provide logs and screenshots before trying the solutions from #38.

I have Win10 1909 (OS Build 18363.836) and installed msys2-x86_64-20200517.exe. Clicked through the installer and started a shell by having the checkbox ticked at the end of the installation, then tried pacman -Syu

$ pacman -Syu
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 msys                                                                                    183.3 KiB  1002 KiB/s 00:00 [#####################################################################] 100%
 msys.sig                                                                                119.0   B  0.00   B/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-3.1.4-2  pacman-5.2.1-7

Total Download Size:   16.80 MiB
Total Installed Size:  50.85 MiB
Net Upgrade Size:       1.05 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 msys2-runtime-3.1.4-2-x86_64                                                              3.0 MiB  1362 KiB/s 00:02 [#####################################################################] 100%
 pacman-5.2.1-7-x86_64                                                                    13.8 MiB  5.73 MiB/s 00:02 [#####################################################################] 100%
(2/2) checking keys in keyring                                                                                       [#####################################################################] 100%
(2/2) checking package integrity                                                                                     [#####################################################################] 100%
(2/2) loading package files                                                                                          [#####################################################################] 100%
(2/2) checking for file conflicts                                                                                    [#####################################################################] 100%
(2/2) checking available disk space                                                                                  [#####################################################################] 100%
:: Processing package changes...
(1/2) upgrading msys2-runtime                                                                                        [#####################################################################] 100%
(2/2) upgrading pacman                                                                                               [#####################################################################] 100%
warning: terminate MSYS2 without returning to shell and check for updates again
warning: for example close your terminal window instead of calling exit

I saw on the website and by the warning that I should not exit but close the whole window. However, after not being able to restart and trying to search the error in msys2_shell.cmd by echoing everything I could not find the error. So I Cltr+C and and run pacman -Syu again to see the mentioned message from #38

$ pacman -Syu
      0 [main] bash (20900) C:\msys64\usr\bin\bash.exe: *** fatal error - cygheap base mismatch detected - 0x180317408/0x18033E408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.

I then uninstalled cygwin and Android SDK that contained a cygwin1.dll as I wasn’t using them anymore on my system. I had 2 cygwin1.dll in another folder that was not in my path variable but to be sure I renamed them. Still did not help.

So I uninstalled MSYS2 again via Windows and C:\msys2 (my installation path, which is the default) is completely removed but I‘m not sure if there are other locations where files are installed. And then tried to install again with the before mentioned installer and as @DweebsUnited mentioned, the installation cannot be completed until a Windows reboot. The following error is shown image

I checked RAM and disk space as I wasn’t sure if memory really refers to RAM but I was quite confident. Both are totally fine. A Windows reboot fixes the problem and msys2 can be installed again with the installer.

Let me know if there are some logs that I could provide but I’m gonna try just upgrading msys2-runtime first and hopefully it works and then maybe have a working version and no logs anymore. However, the current version seems to cause a lot of headaches for some (all?) users when following the instructions on https://www.msys2.org/. Haven’t tried everything from https://www.msys2.org/wiki/MSYS2-installation/ yet but will after my Windows reboot :D

bugybunny avatar May 20 '20 17:05 bugybunny

Just encountered this problem too. Any help appreciated..

LukeFernandes avatar May 23 '20 12:05 LukeFernandes

I btw just ended up not updating. So, install and then do whatever you want but not update. I have absolutely no idea what this means (what old versions am I stuck on, how bad this is) but I just wanted to get something to work real quick and I didn’t want to invest another few other hours.

bugybunny avatar May 23 '20 17:05 bugybunny

See the FAQ entry no. 6.

elieux avatar May 24 '20 19:05 elieux

I had the same problem. After "pacman -Suy" I closed the terminal window, and then in the task manager in the "Detail" tab I killed the "pacman" process. This allowed the terminal to be opened again and everything was still working properly

jvoytech avatar May 27 '20 19:05 jvoytech