Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot upgrade old msys2 because all packages are in zstd format #2353

Closed
gabrielschulhof opened this issue Feb 26, 2021 · 7 comments
Closed

Comments

@gabrielschulhof
Copy link

Hey, all!

I'm trying to

pacman -Syuu

to update everything, but I'm finding myself in a chicken-and-egg scenario where I cannot upgrade because all packages are in zst format, and so is the zstd package. Is there an old version of the zstd package that's stored in a format that old pacman can recognize?

@mingwandroid
Copy link
Member

Can you try to follow the instructions at: https://www.msys2.org/wiki/MSYS2-reinstallation/

@intvsteve
Copy link

Unfortunately I started following instructions here. Now I get this:

$ pacman

That's it. Zero. Nada. Nothing. No output whatsoever. The last entries in the log are from these steps:

pacman --noconfirm -U "http://repo.msys2.org/msys/x86_64/libzstd-1.4.4-2-x86_64.pkg.tar.xz"
pacman --noconfirm -U "http://repo.msys2.org/msys/x86_64/zstd-1.4.4-2-x86_64.pkg.tar.xz"
pacman --noconfirm -U "http://repo.msys2.org/msys/x86_64/pacman-5.2.1-6-x86_64.pkg.tar.xz"

I know that I'd done some of the later steps listed on the News page already in order to get the keys / trust issues resolved.

@mmottaghi
Copy link

mmottaghi commented Mar 5, 2021

I faced the same problem, and resolved it as described below:

Simply replace the existing msys2 installation with a new archive:

  1. Let us assume your current msys2 installation folder is c:\msys64.
  2. Rename c:\msys64 to c:\msys64-old
  3. Download http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20210228.tar.xz and call it newm.tar.xz
  4. Unzip newm.tar.xz at c:\msys64
  5. In a CMD terminal, run: c:\msys64\msys2_shell.cmd -defterm -no-start -use-full-path -c "pwd"

At step 5 all the necessary changes will be automatically made for you, and now you can install any package you want using the fresh pacman.

@intvsteve
Copy link

Thanks, @mmottaghi - but I must be missing something. Does this imply that I must rediscover (manually) and reinstall all the packages and rebuild my entire msys2 environment? My goal was to not start over from scratch if possible.

@mmottaghi
Copy link

You can automatically reinstall all your existing packages.

  1. Obtain a list of your current packages pacman -Qqe | xargs echo > /c/packages.txt ; exit
  2. Reinstall msys2 (follow the 5 steps that I listed above).
  3. Use the list in step 1 to automatically re-install all the packages you had before: pacman -S --needed $(cat /c/packages.txt)

@intvsteve
Copy link

intvsteve commented Mar 10, 2021

Therein lies the problem. In the old install, pacman -Qqe produces no output of any kind. In the new install, it only shows bash.

Update: At this point, it is moot. I have reconstructed enough to get by. The latest mingw-w64-readline package has a problem (reported here) for which I have two workarounds - use my old (i686-only) package rescued from my old msys2, or don't use GNU readline. (The code I'm building offers that as an option.)

@Biswa96
Copy link
Member

Biswa96 commented Oct 5, 2022

All the problems have been fixed. Feel free to reopen the issue if needed.

@Biswa96 Biswa96 closed this as completed Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants