# Error installing msys2-runtime .zst package

**URL:** <https://travis-ci.community/t/error-installing-msys2-runtime-zst-package/8687>\
**Category:** Windows\
**Created:** [May 19, 2020, 9:34am UTC](https://travis-ci.community/t/error-installing-msys2-runtime-zst-package/8687 "2020-05-19T09:34:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![triplef](https://avatars.discourse-cdn.com/v4/letter/t/8491ac/32.png) [@triplef](https://travis-ci.community/u/triplef)\
**Post date:** [May 19, 2020, 9:34am UTC](https://travis-ci.community/t/error-installing-msys2-runtime-zst-package/8687/1 "2020-05-19T09:34:26Z")

</div>

I followed the [instructions](https://docs.travis-ci.com/user/reference/windows/#how-do-i-use-msys2) for using MSYS2/MinGW-w64 with Travis, which originally worked fine. However, after deleting the caches yesterday I am now getting the following error when it’s trying to install msys:

```
downloading msys2-runtime-3.1.4-1-x86_64.pkg.tar.zst...
downloading bash-4.4.023-2-x86_64.pkg.tar.xz...
downloading filesystem-2020.02-2-x86_64.pkg.tar.xz...
downloading mintty-1~3.1.4-1-x86_64.pkg.tar.xz...
downloading pacman-mirrors-20200329-1-any.pkg.tar.xz...
downloading libzstd-1.4.4-2-x86_64.pkg.tar.xz...
downloading zstd-1.4.4-2-x86_64.pkg.tar.xz...
downloading pacman-5.2.1-6-x86_64.pkg.tar.xz...
checking keyring...
checking package integrity...
warning: terminate other MSYS2 programs before proceeding
loading package files...
Errors occurred, no packages were upgraded.
error: could not open file /var/cache/pacman/pkg/msys2-runtime-3.1.4-1-x86_64.pkg.tar.zst: Child process exited with status 127
error: failed to commit transaction (cannot open package file)

```

From the [MSYS2 packages list](http://repo.msys2.org/msys/x86_64/) I can see that msys2-runtime-3.1.4 was just released yesterday, and is the first release using the `zst` format.

`zst` support was [added in pacman 5.2 in October 2019 and requires an update to librarchive](https://forum.manjaro.org/t/upcoming-pacman-5-2-package-compression-changes/107600). However the [MSYS2 package from Chocolatey](https://chocolatey.org/packages/msys2) is from May 2019, so I am assuming it’s not updated to support zst yet.

I’d appreciate any ideas on how to resolve this.

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [May 20, 2020, 8:09am UTC](https://travis-ci.community/t/error-installing-msys2-runtime-zst-package/8687/2 "2020-05-20T08:09:50Z")

</div>

Hey @tripef,

Have you tried updating Pacman via

```bash
pacman -Sy pacman
pacman -Su

```

---

<div class="post-metadata">

**Author:** ![triplef](https://avatars.discourse-cdn.com/v4/letter/t/8491ac/32.png) [@triplef](https://travis-ci.community/u/triplef)\
**Post date:** [May 20, 2020, 8:36am UTC](https://travis-ci.community/t/error-installing-msys2-runtime-zst-package/8687/3 "2020-05-20T08:36:40Z")

</div>

Thanks for the suggestion. Unfortunately I don’t think this will work, as the error happens as part of the initial MSYS2 installation via `choco upgrade --no-progress -y msys2`.

The only solution I see right now is not to use Chocolatey to install msys2, but instead another more recent build e.g. from [msys2-installer](https://github.com/msys2/msys2-installer/releases).

By the way, I’m pretty sure this issue is reproducible for any newly set up Windows CI using the official Travis instructions, or for any existing ones if you delete the cache.

Here’s the full build log (you’ll have to expand the line `$ case $TRAVIS_OS_NAME in` to see the error):  
[https://travis-ci.org/github/gnustep/libs-base/jobs/688709566#L49](https://travis-ci.org/github/gnustep/libs-base/jobs/688709566#L49)

---

<div class="post-metadata">

**Author:** ![triplef](https://avatars.discourse-cdn.com/v4/letter/t/8491ac/32.png) [@triplef](https://travis-ci.community/u/triplef)\
**Post date:** [May 21, 2020, 4:39pm UTC](https://travis-ci.community/t/error-installing-msys2-runtime-zst-package/8687/4 "2020-05-21T16:39:23Z")

</div>

I verified that this can be reproduced by just running `choco install msys2`, and I reported it here:

> <https://github.com/msys2/MSYS2-packages/issues/1970>
>
> Describe the bug
> Installing MSYS2 via Chocolatey fails due to the pacman version that is bundled with the MSYS2 Chocolatey package being...

---

<div class="post-metadata">

**Author:** ![triplef](https://avatars.discourse-cdn.com/v4/letter/t/8491ac/32.png) [@triplef](https://travis-ci.community/u/triplef)\
**Post date:** [May 22, 2020, 2:18pm UTC](https://travis-ci.community/t/error-installing-msys2-runtime-zst-package/8687/5 "2020-05-22T14:18:50Z")

</div>

This has been resolved in the MSYS2 package distribution.

---

<div class="post-metadata">

**Author:** ![r-hoogenboom](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/r-hoogenboom/32/7284_2.png) [@r-hoogenboom](https://travis-ci.community/u/r-hoogenboom)\
**Post date:** [October 12, 2021, 3:11pm UTC](https://travis-ci.community/t/error-installing-msys2-runtime-zst-package/8687/6 "2021-10-12T15:11:03Z")

</div>

Instead of using a new installer, you could compile the zstd binary from ‘git clone [GitHub - facebook/zstd: Zstandard - Fast real-time compression algorithm](https://github.com/facebook/zstd.git)’ → cd zstd; make, then convert the .zst files in /var/cache/pacman/pkg (notably the pacman, libzstd and zstd packages) to .gz (or .bz2 or .xz) using:  
`for f in /var/cache/pacman/pkg/*.zst; do programs/zstd -dc $f | gzip > ${f%.zst}.gz; done`  
and updating the pacman, zstd and libzstd packages using:  
`pacman -U /var/cache/pacman/pkg/{pacman,zstd,libzstd}*.gz`  
After that, pacman can use zst compressed packages.
