gpt4 book ai didi

haskell - Pandoc 在 GHC 7.8.2 上编译失败

转载 作者:行者123 更新时间:2023-12-02 17:29:11 27 4
gpt4 key购买 nike

我尝试在 GHC-7.8.2Fedora 19 上安装 Pandoc,但遇到 zip-archive 问题 em> 包。

zip-archive-0.2.2.1 failed during the building phase.

The exception was: ExitFailure 1

所以我从 github 获取了最后一个,并尝试从源代码安装它,但仍然出现错误:

Preprocessing library zip-archive-0.2.2.1...
/usr/bin/ld: cannot find -lHSzlib-0.5.4.1-ghc7.8.2
/usr/bin/ld: cannot find -lHStext-1.1.1.2-ghc7.8.2
/usr/bin/ld: cannot find -lHSmtl-2.2.0.1-ghc7.8.2
/usr/bin/ld: cannot find -lHStransformers-0.4.1.0-ghc7.8.2

我已经安装了 zlib、zlib、-devel、ghc-zlib、ghc-zlib-devel

更新:

在用 root 构建的较新的 1.20 手动替换我的 /usr/bin/cabal 可执行文件后,我终于摆脱了这个问题,但遇到了另一个问题:

[ 5 of 57] Compiling Text.Pandoc.Readers.Haddock.Lex ( dist/build/Text/Pandoc/Readers/Haddock/Lex.hs, dist/build/Text/Pandoc/Readers/Haddock/Lex.o )

dist/build/Text/Pandoc/Readers/Haddock/Lex.hs:500:17:
Pattern bindings containing unlifted types should use an outermost bang pattern:

...

dist/build/Text/Pandoc/Readers/Haddock/Lex.hs:504:31:
Couldn't match expected type ‘Bool’ with actual type ‘Int#’
In the first argument of ‘(&&)’, namely ‘(offset >=# 0#)’
In the expression: (offset >=# 0#) && (check ==# ord_c)
In the expression:
if (offset >=# 0#) && (check ==# ord_c) then
alexIndexInt16OffAddr alex_table offset
else
alexIndexInt16OffAddr alex_deflt s

dist/build/Text/Pandoc/Readers/Haddock/Lex.hs:504:50:
Couldn't match expected type ‘Bool’ with actual type ‘Int#’
In the second argument of ‘(&&)’, namely ‘(check ==# ord_c)’
In the expression: (offset >=# 0#) && (check ==# ord_c)
In the expression:
if (offset >=# 0#) && (check ==# ord_c) then
alexIndexInt16OffAddr alex_table offset
else
alexIndexInt16OffAddr alex_deflt s
Failed to install pandoc-1.12.4
cabal: Error: some packages failed to install:
pandoc-1.12.4 failed during the building phase. The exception was:

重新安装 haddock 没有帮助。

有什么解决此问题的建议吗?

最佳答案

您似乎缺少动态库。最有可能的是,您需要安装 cabal-install-1.18 或更高版本,删除您的软件包数据库,然后再次安装。欲了解更多信息,请参阅:https://plus.google.com/115504368969270249241/posts/R8EYrABDrvv

关于haskell - Pandoc 在 GHC 7.8.2 上编译失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23629706/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com