0

I've been trying to install the yesod framework following the suggested steps:

stack new my-project yesodweb/sqlite
cd my-project
stack install yesod-bin --install-ghc

However I get the compilation error:

Error: [S-7282]
       Stack failed to execute the build plan.

       While executing the build plan, Stack encountered the error:

       [S-7011]
       While building package zlib-0.6.3.0 (scroll up to its section to see the error) using:....

and the rows concerning the build of zlib are

zlib               > Cabal-simple_w2MFVN35_3.6.3.0_ghc-9.2.8: Missing dependency on a foreign
zlib               > library:
zlib               > * Missing (or bad) header file: zlib.h
zlib               > * Missing (or bad) C library: z
zlib               > This problem can usually be solved by installing the system package that
zlib               > provides this library (you may need the "-dev" version). If the library is
zlib               > already installed but in a non-standard location then you can use the flags
zlib               > --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
zlib               > library file does exist, it may contain errors that are caught by the C
zlib               > compiler at the preprocessing stage. In this case you can re-run configure
zlib               > with the verbosity flag -v3 to see the error messages.
zlib               > If the header file does exist, it may contain errors that are caught by the C
zlib               > compiler at the preprocessing stage. In this case you can re-run configure
zlib               > with the verbosity flag -v3 to see the error messages.

I am on Fedora 42 and have zlib and its development version installed in my system via the zlib-ng:

❯ dnf list --installed | grep zlib
zlib-ng.x86_64                                       2.2.4-3.fc42                         fedora
zlib-ng-compat.i686                                  2.2.4-3.fc42                         fedora
zlib-ng-compat.x86_64                                2.2.4-3.fc42                         fedora
zlib-ng-compat-devel.x86_64                          2.2.4-3.fc42                         fedora
zlib-ng-devel.x86_64                                 2.2.4-3.fc42                         fedora

and the zlib.h file exists in /usr/include so I'm not sure what the problem is or how to debug it further.

2
  • What does pkg-config --libs zlib say? Commented Jul 19 at 23:37
  • It retrieves just -lz Commented Jul 20 at 7:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.