从我构建haskell-stack
时出现以下错误:
store-0.3: download
store-0.3: configure
store-0.3: build
-- While building package store-0.3 using:
/tmp/haskell-stack-20170403-52407-1rpyzwy/stack-1.4.0/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.22.5.0_ghc-7.10.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /tmp/haskell-stack-20170403-52407-1rpyzwy/stack-1.4.0/.stack-work/logs/store-0.3.log
Configuring store-0.3...
Building store-0.3...
Preprocessing library store-0.3...
[ 1 of 11] Compiling Data.Store.Streaming.Internal ( src/Data/Store/Streaming/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Streaming/Internal.o )
[ 2 of 11] Compiling System.IO.ByteBuffer ( src/System/IO/ByteBuffer.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/System/IO/ByteBuffer.o )
[ 3 of 11] Compiling Data.Store.Impl ( src/Data/Store/Impl.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Impl.o )
[ 4 of 11] Compiling Data.Store.TH ( src/Data/Store/TH.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/TH.o )
[ 5 of 11] Compiling Data.Store.TH.Internal ( src/Data/Store/TH/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/TH/Internal.o )
[ 6 of 11] Compiling Data.Store.Internal ( src/Data/Store/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Internal.o )
<command line>: can't load .so/.DLL for: libz.so (libz.so: cannot open shared object file: No such file or directory)
有谁知道可能导致这种情况的原因?我在我的机器上安装了zlib
开发。
答案 0 :(得分:2)
原来我需要添加两个标志来指定zlib include和lib:
--extra-include-dirs
--extra-lib-dirs
答案 1 :(得分:0)
就我而言,libz-dev
软件包安装解决了该问题。
sudo apt install libz-dev