gpt4 book ai didi

ubuntu - 安装 pandoc 的问题

转载 作者:行者123 更新时间:2023-12-04 18:35:51 26 4
gpt4 key购买 nike

我正在尝试在新的 Ubuntu 机器上安装 pandoc。首先,我安装了haskell平台。然后我使用命令 cabal install pandoc 安装 pandoc ,但随后收到以下错误消息。我该如何解决?

[1 of 1] Compiling Data.Ipynb       ( src/Data/Ipynb.hs, dist/build/Data/Ipynb.o )

src/Data/Ipynb.hs:152:23: error:
• No instance for (Ord Value)
arising from the 'deriving' clause of a data type declaration
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
• When deriving the instance for (Ord JSONMeta)
|
152 | deriving (Show, Eq, Ord, Generic, Semigroup, Monoid, FromJSON)
| ^^^

src/Data/Ipynb.hs:479:23: error:
• No instance for (Ord Value)
arising from the first field of ‘JsonData’ (type ‘Value’)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
• When deriving the instance for (Ord MimeData)
|
479 | deriving (Show, Eq, Ord, Generic)
| ^^^
Failed to install ipynb-0.2
cabal: Error: some packages failed to install:
ipynb-0.2-12lvW0D0287FL7WAB5JQxT failed during the building phase. The
exception was:
ExitFailure 1
pandoc-2.17.0.1-5yDcj1RH0pT4FRdq4hDaRb depends on pandoc-2.17.0.1 which failed
to install.

最佳答案

您似乎在使用 aeson 的旧版本包裹。直到版本 1.5.1.0,its Value type did not have an Ord instance .但是 ipynb库需要那个实例,所以它应该有约束 aeson >=1.5.2在其.cabal文件——但它没有。 (您可能需要就此提交拉取请求。)
目前,您可以手动使用

cabal install pandoc --constraint 'aeson>=1.5.2'
(这可能会导致必须重新安装大量软件包或其他问题!)

关于ubuntu - 安装 pandoc 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70854571/

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