安装pandoc的问题



我正试图在一台新的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之前,其Value类型没有Ord实例。但是ipynb库需要该实例,所以它的.cabal文件中应该有约束aeson >=1.5.2,但它没有。(您可能需要提交一份关于此的拉取请求。(

目前,您可以手动使用

cabal install pandoc --constraint 'aeson>=1.5.2'

(这可能导致不得不重新安装大量软件包,或其他问题!(

如果您不需要最新版本,有一种简单的方法:

sudo apt install pandoc

相关内容

  • 没有找到相关文章

最新更新