【问题标题】:Problems with installing pandoc安装 pandoc 的问题
【发布时间】:2022-01-25 19:28:27
【问题描述】:

我正在尝试在新的 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.

【问题讨论】:

标签: ubuntu haskell installation pandoc


【解决方案1】:

您似乎使用的是旧版本的 aeson 软件包。最高版本 1.5.1.0,its Value type did not have an Ord instance。但是ipynb 库需要该实例,因此它的.cabal 文件中应该有约束aeson >=1.5.2——但它没有。 (您可能需要对此提出拉取请求。)

目前,您可以手动使用

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

(这可能会导致必须重新安装大量软件包或其他问题!)

【讨论】:

【解决方案2】:

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

sudo apt install pandoc

【讨论】:

猜你喜欢
  • 2015-06-24
  • 1970-01-01
  • 2021-05-31
  • 2016-12-13
  • 1970-01-01
  • 2022-01-06
  • 2012-05-07
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多