【问题标题】:ghc-pkg check haddock warningsghc-pkg 检查黑线鳕警告
【发布时间】:2014-03-21 09:13:03
【问题描述】:

OSX 10.9.2 上全新安装haskell 平台(通过homebrew)(GHC x64 7.6.3) 运行ghc-pkg check 时收到以下警告(见下文)

Warning: haddock-interfaces: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/ghc-mod-3.1.7/html/ghc-mod.haddock doesn't exist or isn't a file
Warning: haddock-html: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/ghc-mod-3.1.7/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/hlint-1.8.59/html/hlint.haddock doesn't exist or isn't a file
Warning: haddock-html: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/hlint-1.8.59/html doesn't exist or isn't a directory
Warning: haddock-html: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/mtl-2.1.2/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/transformers-0.3.0.0/html/transformers.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/transformers-0.3.0.0/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/case-insensitive-1.0.0.1/html/case-insensitive.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/case-insensitive-1.0.0.1/html doesn't exist or isn't a directory

根据文档:

ghc-pkg check
    Check the consistency of package depenencies and list broken packages.
    Accepts the --simple-output flag.

我尝试运行以下命令生成黑线鳕文档无济于事:

sudo cabal install --reinstall --force-reinstalls --enable-documentation

该命令来自用户在 haskell 邮件列表中提出的类似问题。 http://www.haskell.org/pipermail/glasgow-haskell-users/2012-February/021780.html

如何安抚ghc-pkg check 并删除这些警告?

CAVEAT:当我说“全新安装”时,我的意思是我已经从头开始安装了 Haskell 平台,并在全局范围内安装了 cabal-1.18.0.3,并将 cabal 的 bin 目录添加到我的路径中。

【问题讨论】:

  • 警告抱怨ghc-modhlint。 Haskell 平台中也没有。因此,如果您真的重新安装了 Haskell 平台,您的 ~/.cabal 目录中可能仍然有以前安装的旧包。
  • 除了这两个之外还有很多 很多,让我粘贴更新。见上文。
  • 我在 Ubuntu (12.04.4 LTS) 上有完全相同的东西,我首先卸载了所有与 Haskell 相关的软件包,然后安装了 haskell-platform 软件包 (2012.1.0.0~debian1 )。我的主目录中没有 .cabal 文件夹。它抱怨 stm-2.4.2、Cabal-1.18.1.3 等等。

标签: haskell cabal haddock


【解决方案1】:

那些黑线鳕警告很烦人,但它们不会造成任何问题,AFAIK。我认为这些警告在 Cabal 1.18 中已修复。我再也见不到他们了。


编辑:好的,所以我们需要听从 kosmikus 的建议...

mv ~/.cabal ~/.cabal.SAVE
cabal update

这将创建文件 ~/.cabal/config。您可以根据需要编辑此文件。

现在尝试构建一些东西,看看问题是否消失了。

【讨论】:

  • 我正在使用Cabal-1.18.0.3(最新)
  • 在我的具体情况下(在 Ubuntu 上,请参阅我对问题的评论)我没有本地 .cabal 文件夹。我的 haskell 平台中的 cabal 版本是 cabal-install 0.14.0 / library 1.14.0。
  • 目录/Users/user/.cabal 是否存在?你的用户名是user吗?
  • 我不再使用 Haskell 平台,因为它已经过时了,我从预构建的二进制文件中安装它。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-12-09
  • 1970-01-01
  • 2017-06-26
  • 2022-07-26
  • 1970-01-01
相关资源
最近更新 更多