haskell堆栈存储-0.3:libz.so
从中构建haskell堆栈存储-0.3:libz.so,haskell,haskell-stack,Haskell,Haskell Stack,从中构建haskell堆栈时,我得到以下错误: 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.
haskell堆栈时,我得到以下错误:
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)
store-0.3:下载
store-0.3:配置
store-0.3:构建
--在使用以下各项构建package store-0.3时:
/tmp/haskell-stack-20170403-52407-1rpyzwy/stack-1.4.0/.stack/setup exe cache/x86_64-linux/Cabal-simple\u mPHDZzAJ_1.22.5.0_ghc-7.10.3--builddir=.stack work/dist/x86_64-linux/Cabal-1.22.5.0 build--ghc选项“-ddump hi-ddump to file”
进程已退出,代码为:ExitFailure 1
日志已写入:/tmp/haskell-stack-20170403-52407-1rpyzwy/stack-1.4.0/.stack work/Logs/store-0.3.log
正在配置store-0.3。。。
正在构建存储-0.3。。。
预处理库存储-0.3。。。
[1/11]编译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/11]编译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/11]编译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/11]编译Data.Store.TH(src/Data/Store/TH.hs、.stack work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/TH.o)
[11之5]编译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/11]编译Data.Store.Internal(src/Data/Store/Internal.hs、.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Internal.o)
:无法为:libz.so加载.so/.DLL(libz.so:无法打开共享对象文件:没有此类文件或目录)
有人知道这可能是什么原因吗?我的机器上安装了zlib
开发。结果我需要添加两个标志来指定zlib include和lib:
--extra-include-dirs
--extra-lib-dirs
在我的例子中,libz-dev
package安装解决了这个问题
sudo apt install libz-dev
真奇怪!libz由zlib包使用,zlib包是streamingcommons包的一个依赖项。因此,我希望在编译zlib包时,而不是在编译存储时,会出现这个问题。如果您执行“stack exec--ghc pkg unregister zlib”并再次尝试构建,会发生什么?是否安装了systems libz dev包?