【问题标题】:Haskell reinstall base with profiling enabled启用分析的 Haskell 重新安装基础
【发布时间】:2014-06-20 11:07:07
【问题描述】:

我正在尝试按照here 列出的说明重新安装启用分析功能的 Haskell 库

但是,每当 cabal 尝试重新安装其中一个库时,我都会收到以下消息:

LibraryNameHere.hs:1:1:
    Could not find module `Prelude'
    Perhaps you haven't installed the profiling libraries for package `base'?
    Use -v to see a list of the files searched for.

当我尝试重新安装 base 并启用分析时,我收到以下消息:

me@machine:~/.cabal/$ cabal install -p base
Resolving dependencies...
All the requested packages are already installed:
base-4.5.0.0
Use --reinstall if you want to reinstall anyway.
me@machine:~/.cabal/$ cabal install --reinstall -p base
Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: base (user goal)
rejecting: base-4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0,
4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0 (only already
installed instances can be used)
rejecting: base-3.0.3.2 (conflict: base => base>=4.0 && <4.3)
rejecting: base-3.0.3.1 (conflict: base => base>=4.0 && <4.2)

如何在启用分析的情况下重新安装 base?

【问题讨论】:

  • 一般不建议重装basebase 的分析库应该随 GHC 一起提供。也许你没有安装-prof 包?
  • @MikhailGlushenkov Facepalm, sudo apt-get install ghc-prof。问题解决了!

标签: haskell profiling ghc cabal haskell-platform


【解决方案1】:

如果默认情况下,base 分析库未包含在您的 Haskell/GHC 安装中,它们将通过操作系统的包管理器包含在单独的包中。

Debian Linux 系统:

sudo apt-get install ghc-prof

【讨论】:

  • 我在安装 ghc-prof 后遇到了同样的“找不到模块”错误。
【解决方案2】:

试试

cabal update
cabal install ghc-prof

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-04-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多