Is there no libzstd.so.1 in KDE Linux?

Building a Haskell program und Nix I encountered this error

running dist/build/Codec/Compression/Zlib/Stream_hsc_make failed (exit code 127)
rsp file was: “dist/build/Codec/Compression/Zlib/hsc2hscall16230-3.rsp”
output file:“dist/build/Codec/Compression/Zlib/Stream.hs”
command was: dist/build/Codec/Compression/Zlib/Stream_hsc_make >dist/build/Codec/Compression/Zlib/Stream.hs
error: dist/build/Codec/Compression/Zlib/Stream_hsc_make: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory

Where is it or how to install it?

For me it’s at /usr/lib/libzstd.so.1 (as per your other thread).

Is that file not there in your KDE Linux? Or can your Haskell toolchain not find it for some other reason?

the is only /usr/lib/zsh

Interesting, so I guess you see no output from this?

$ ls -al /usr/lib/libzstd*
lrwxrwxrwx 1 root root     12 2026-02-15 16:43 /usr/lib/libzstd.so -> libzstd.so.1
lrwxrwxrwx 1 root root     16 2026-02-15 16:43 /usr/lib/libzstd.so.1 -> libzstd.so.1.5.7
-rwxr-xr-x 1 root root 939976 2025-02-20 16:50 /usr/lib/libzstd.so.1.5.7

And you’re running directly in KDE Linux, not inside a container?

directly. on latest. all there is is zsh

Me too. So I’m not very sure what’s happening, since all the immutable parts of the system should be identical for us.

You mean literally that the /usr/lib directory contains zsh and nothing else?

[mf@kde-linux:~] $ ls -al /usr/lib | grep zl
[mf@kde-linux:~] [1] $

For me too, but then grep zl doesn’t match any of the filenames we’re talking about here, so it’s not a surprise.

The latest image is 2026-06-06, so you could try updating to that. But then I haven’t seen any issues reported for the 2026-06-04 image that would explain this, so I don’t know.

zsh the only entry starting with z.

but grepping zl was wrong of course.

Yes, that’s the same for me.

only entry starting with z.

The file in question doesn’t start with “z”; it’s libzstd.so.1. And I’ve also got /usr/lib/libzstd.so.1 on my 2026-06-04 build, too.

I think you likely do have that file on your system, and the problem is that the build process you’re using simply doesn’t see it for some reason. Perhaps the include paths aren’t set up to include /usr/lib? I’m not familiar at all with how Nix works though.

If you truly don’t have /usr/lib/libzstd.so.1, the most likely explanation is that when you look for the file, you’re in a container (Kapsule, Distrobox, etc) without realizing it.

thank you. I was a bit disoriented obviously. Will investigate why the build doesn’t see it. Add it to LD_LIBRARY_PATH at first.