Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell 堆栈生成错误:在生成包aeson时。(阴谋集团)退出失败1_Haskell_Ghc_Cabal_Haskell Stack_Aeson - Fatal编程技术网

Haskell 堆栈生成错误:在生成包aeson时。(阴谋集团)退出失败1

Haskell 堆栈生成错误:在生成包aeson时。(阴谋集团)退出失败1,haskell,ghc,cabal,haskell-stack,aeson,Haskell,Ghc,Cabal,Haskell Stack,Aeson,当我运行“堆栈构建”时,我得到一个错误: -- While building package aeson-1.1.2.0 using: /Users/kaspazza/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options "" Pro

当我运行“堆栈构建”时,我得到一个错误:

--  While building package aeson-1.1.2.0 using:
      /Users/kaspazza/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
    Process exited with code: ExitFailure 1
My stack.yaml:

resolver: lts-9.10

packages:
- '.'

extra-deps: []

flags: {}

extra-package-dbs: []
命令:stack exec——哪个ghc 给出:

命令:ghc--version

命令:堆栈构建

aeson   > configure
aeson   > Configuring aeson-1.1.2.0...
aeson   > build    
aeson   > Building aeson-1.1.2.0...
aeson   > Preprocessing library aeson-1.1.2.0...
aeson   > [ 1 of 21] Compiling Data.Aeson.Types.Internal ( Data/Aeson/Types/Internal.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Types/Internal.o )
aeson   > [ 2 of 21] Compiling Data.Aeson.Types.Generic ( Data/Aeson/Types/Generic.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Types/Generic.o )
aeson   > [ 3 of 21] Compiling Data.Aeson.Parser.UnescapeFFI ( ffi/Data/Aeson/Parser/UnescapeFFI.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/UnescapeFFI.o )
aeson   > [ 4 of 21] Compiling Data.Aeson.Parser.Unescape ( Data/Aeson/Parser/Unescape.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/Unescape.o )
aeson   > [ 5 of 21] Compiling Data.Aeson.Parser.Internal ( Data/Aeson/Parser/Internal.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/Internal.o )
aeson   > <command line>: can't load .so/.DLL for: /Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib (dlopen(/Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib, 5): REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment 2 which is not a writable segment (__LINKEDIT) in /Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib)

--  While building package aeson-1.1.2.0 using:
      /Users/kaspazza/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
    Process exited with code: ExitFailure 1
Progress 1/2
aeson>配置
aeson>配置aeson-1.1.2.0。。。
伊森>建造
aeson>建筑aeson-1.1.2.0。。。
aeson>预处理库aeson-1.1.2.0。。。
aeson>[1/21]编译Data.aeson.Types.Internal(Data/aeson/Types/Internal.hs、.stack work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/aeson/Types/Internal.o)
aeson>[2/21]编译Data.aeson.Types.Generic(Data/aeson/Types/Generic.hs、.stack work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/aeson/Types/Generic.o)
aeson>[3/21]编译Data.aeson.Parser.UnescapeFFI(ffi/Data/aeson/Parser/UnescapeFFI.hs、.stack work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/aeson/Parser/UnescapeFFI.o)
aeson>[4/21]编译Data.aeson.Parser.Unescape(Data/aeson/Parser/Unescape.hs、.stack work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/aeson/Parser/Unescape.o)
aeson>[5/21]编译Data.aeson.Parser.Internal(Data/aeson/Parser/Internal.hs、.stack work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/aeson/Parser/Internal.o)
aeson>:无法加载.so/.DLL for:/Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cf02507e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-kz1jqnx8ujmlhuppj6v1y-ghc8.0.2.2.dylib(/Users/kaspazza/.stack/snapshots/x86_64-osx/8B5CF025076E7BAB89D6DBB5E562716CF2B67BBCDE1528460C4F36FEEFA23FB/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.2.2.dylib,5):重新设置_段和_偏移量_段的基础,该段不可写(_段)在/Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cf025076e7bab89d6db5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-kz1jqnx8uhlhjuppj6v1y-ghc8.0.2.2.dylib)
--在构建包aeson-1.1.2.0时,使用:
/Users/kaspazza/.stack/setup exe cache/x86_64-osx/Cabal-simple\u mPHDZzAJ_1.24.2.0_ghc-8.0.2--builddir=.stack work/dist/x86_64-osx/Cabal-1.24.2.0 build--ghc options“”
进程已退出,代码为:ExitFailure 1
进展1/2
命令:阴谋集团安装

cabal: Could not resolve dependencies:
[__0] trying: duckling-0.1.6.1 (user goal)
[__1] next goal: snap-server (dependency of duckling)
[__1] rejecting: snap-server-1.1.1.1 (conflict: duckling =>
snap-server>=1.0.1.1 && <1.1)
[__1] skipping: snap-server-1.1.1.0, snap-server-1.1.0.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=1.0.1.1 && <1.1' from 'duckling')
[__1] trying: snap-server-1.0.3.3
[__2] next goal: base (dependency of duckling)
[__2] rejecting: base-4.13.0.0/installed-4.13.0.0 (conflict: snap-server =>
base>=4 && <4.11)
[__2] skipping: base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
base-4.11.0.0 (has the same characteristics that caused the previous version
to fail: excluded by constraint '>=4 && <4.11' from 'snap-server')
[__2] rejecting: base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
base-3.0.3.1 (constraint from non-upgradeable package requires installed
instance)
[__2] fail (backjumping, conflict set: base, duckling, snap-server)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: snap-server, duckling, base
cabal:无法解析依赖项:
[\uu 0]尝试:duckling-0.1.6.1(用户目标)
[\uu 1]下一个目标:快照服务器(依赖于duckling)
[\uu 1]拒绝:snap-server-1.1.1(冲突:duckling=>
快照服务器>=1.0.1.1&&
base>=4&从我的评论中复制

显然,这也是使用
ghc-8.6.3
构建的。这样一个版本的ghc可以在stack的快照
13.11
中获得。如果您愿意,可以更改
stack.yaml
以将解析器设置为
lts-13.11
。它将下载不同版本的编译器和库。也许可以工作

根据你的评论 正如您所说,您必须添加
allow newer:true
,以便它能够正确地解决依赖关系

从我的评论中复制
显然,这也是使用
ghc-8.6.3
构建的。这样一个版本的ghc可以在stack的快照
13.11
中获得。如果您愿意,可以更改
stack.yaml
以将解析器设置为
lts-13.11
。它将下载不同版本的编译器和库。也许可以工作

根据你的评论
正如你所说,你必须添加
allow newer:true
,这样它才能正确地解决依赖关系

顺便说一句,
cabal
失败了,因为triying使用
base-4.13
,这是
ghc-8.8.3
的基本包,而facebook的
duckling
是建立在
ghc-8.0.2
之上的,所以cabal编译器版本冲突。
stack
aeson
依赖项中失败,不在
base
中,显然有人和您有非常相同的问题:删除
stack.yaml
并运行
stack build
对他们有效显然这也是使用
ghc-8.6.3
构建的。
gh的这样一个版本c
在stack的快照
13.11
中可用。我已经手动检查了依赖项,似乎还可以。如果愿意,请更改
stack.yaml
以将解析器设置为
lts-13.11
。它将下载不同版本的编译器和库。可能是works@Ismor是的!!最后!!非常感谢!张正在将解析程序添加到lts-13.11,并在我的堆栈中添加allow-newer:true(但这是因为设置了依赖项)。yaml使其正常工作!@Ismor您可以添加答案,以便我将其标记为已解决:)顺便说一句,
cabal
之所以失败,是因为它试图使用
base-4.13
,这是
ghc-8.8.3
的基本包,而facebook的
duckling
是建立在
ghc-8.0.2
之上的,所以cabal与编译器版本有点冲突。
stack
aeson
依赖关系中失败,而不是在
中ode>base
显然有人和你有同样的问题:删除
堆栈。yaml
并运行
stack build
对他们有效显然这也是使用
ghc-8.6.3
构建的。这样一个版本的
ghc
可以在堆栈的快照
13.11
中找到。我已经手动检查了依赖项,并将其删除似乎还可以。如果愿意,请更改
stack.yaml
以将解析器设置为
lts-13.11
。它将下载不同版本的编译器和库。可能works@IsmorYEESS!!FINALLYY!!非常感谢!将冲突解决程序更改为lts-13.11并添加允许更新的:true(但这是因为设置了依赖项)在my stack.yaml中,它成功了!@Ismor您可以添加答案,这样我就可以将它标记为已解决:)有趣的是,从头开始重新安装lts-9.10,或者删除并使其在内部创建新快照。堆栈文件没有帮助(正如GitHub问题上建议的那样)。这就是这个版本的问题所在。允许-n
aeson   > configure
aeson   > Configuring aeson-1.1.2.0...
aeson   > build    
aeson   > Building aeson-1.1.2.0...
aeson   > Preprocessing library aeson-1.1.2.0...
aeson   > [ 1 of 21] Compiling Data.Aeson.Types.Internal ( Data/Aeson/Types/Internal.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Types/Internal.o )
aeson   > [ 2 of 21] Compiling Data.Aeson.Types.Generic ( Data/Aeson/Types/Generic.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Types/Generic.o )
aeson   > [ 3 of 21] Compiling Data.Aeson.Parser.UnescapeFFI ( ffi/Data/Aeson/Parser/UnescapeFFI.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/UnescapeFFI.o )
aeson   > [ 4 of 21] Compiling Data.Aeson.Parser.Unescape ( Data/Aeson/Parser/Unescape.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/Unescape.o )
aeson   > [ 5 of 21] Compiling Data.Aeson.Parser.Internal ( Data/Aeson/Parser/Internal.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/Internal.o )
aeson   > <command line>: can't load .so/.DLL for: /Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib (dlopen(/Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib, 5): REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment 2 which is not a writable segment (__LINKEDIT) in /Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib)

--  While building package aeson-1.1.2.0 using:
      /Users/kaspazza/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
    Process exited with code: ExitFailure 1
Progress 1/2
cabal: Could not resolve dependencies:
[__0] trying: duckling-0.1.6.1 (user goal)
[__1] next goal: snap-server (dependency of duckling)
[__1] rejecting: snap-server-1.1.1.1 (conflict: duckling =>
snap-server>=1.0.1.1 && <1.1)
[__1] skipping: snap-server-1.1.1.0, snap-server-1.1.0.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=1.0.1.1 && <1.1' from 'duckling')
[__1] trying: snap-server-1.0.3.3
[__2] next goal: base (dependency of duckling)
[__2] rejecting: base-4.13.0.0/installed-4.13.0.0 (conflict: snap-server =>
base>=4 && <4.11)
[__2] skipping: base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
base-4.11.0.0 (has the same characteristics that caused the previous version
to fail: excluded by constraint '>=4 && <4.11' from 'snap-server')
[__2] rejecting: base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
base-3.0.3.1 (constraint from non-upgradeable package requires installed
instance)
[__2] fail (backjumping, conflict set: base, duckling, snap-server)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: snap-server, duckling, base