我擦除并重新安装了Haskell平台(Haskell.org:cabal、stack、ghc),但是现在没有插件包可以正确安装。阴谋集团总是以ExitFailure1结尾。可能是因为无法找到依赖项。但是,在大多数情况下,它是主要软件包,由于某些原因它无法解决。 有这种现象的经验吗?
本地堆栈构建
-- While building custom Setup.hs for package json-lesson-0.1.0.0 using:
/Users/administrator/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/Users/administrator/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc --with-ghc-pkg=/Users/administrator/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/administrator/.stack/snapshots/x86_64-osx/lts-12.5/8.4.3/pkgdb --package-db=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/pkgdb --libdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/lib --bindir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/bin --datadir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/share --libexecdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/libexec --sysconfdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/etc --docdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/doc/json-lesson-0.1.0.0 --htmldir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/doc/json-lesson-0.1.0.0 --haddockdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/doc/json-lesson-0.1.0.0 --dependency=aeson=aeson-1.3.1.1-v8c5j6KkT8PoXkOVjikF --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=text=text-1.2.3.0
Process exited with code: ExitFailure 1
使用Cabal安装:
MacBook-2:Haskell administrator$ cabal install aeson
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Resolving dependencies...
Downloading base-compat-0.10.4...
Downloading dlist-0.8.0.4...
Configuring dlist-0.8.0.4...
Downloading tagged-0.8.6...
Downloading th-abstraction-0.2.8.0...
Configuring tagged-0.8.6...
Configuring base-compat-0.10.4...
Configuring th-abstraction-0.2.8.0...
Building dlist-0.8.0.4...
Building tagged-0.8.6...
Building base-compat-0.10.4...
Building th-abstraction-0.2.8.0...
Installed dlist-0.8.0.4
Downloading time-locale-compat-0.1.1.4...
Configuring time-locale-compat-0.1.1.4...
Building time-locale-compat-0.1.1.4...
Installed tagged-0.8.6
Downloading uuid-types-1.0.3...
Configuring uuid-types-1.0.3...
Installed time-locale-compat-0.1.1.4
Building uuid-types-1.0.3...
Failed to install uuid-types-1.0.3
Build log ( /Users/administrator/.cabal/logs/ghc-8.4.3/uuid-types-1.0.3-tE9Bfk2PgXDUPgbtamBdI.log ):
cabal: Entering directory '/var/folders/81/50s00bl11pv7fn8dw4n0w03m0000gn/T/cabal-tmp-5513/uuid-types-1.0.3'
Configuring uuid-types-1.0.3...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing library for uuid-types-1.0.3..
Building library for uuid-types-1.0.3..
<command line>: cannot satisfy -package-id hashable-1.2.7.0-3hrKWzET808E40baaqgc23
(use -v for more information)
cabal: Leaving directory '/var/folders/81/50s00bl11pv7fn8dw4n0w03m0000gn/T/cabal-tmp-5513/uuid-types-1.0.3'
Installed th-abstraction-0.2.8.0
Installed base-compat-0.10.4
Updating documentation index
/Users/administrator/Library/Haskell/share/doc/x86_64-osx-ghc-8.4.3/index.html
cabal: Error: some packages failed to install:
aeson-1.4.0.0-64eUw61rbC49Aocs9eETca depends on aeson-1.4.0.0 which failed to
install.
uuid-types-1.0.3-tE9Bfk2PgXDUPgbtamBdI failed during the building phase. The
exception was:
ExitFailure 1
答案 0 :(得分:2)
解决Cabal软件包损坏的问题:在OSX中有一个“ Frameworks”目录。它保留了一个Haskell框架,您需要删除它,否则ghc会在后台保持活动状态,并且用cabal构建软件包会失败。通常,您需要删除(隐藏的).cabal,.stack和.ghc目录,以及“框架”中的Haskell框架。在〜/ Library和〜/ User / Library中还有两个(!)Haskell目录,最好删除。
在寻找Rails框架时偶然发现了这一点。谢谢大家为可能的解决方案做出贡献!