我正在尝试按照列出的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)
如何在启用性能分析的情况下重新安装基础?
答案 0 :(得分:15)
如果默认情况下您的Haskell / GHC安装中没有包含base
分析库,它们将通过您的操作系统软件包管理器包含在单独的软件包中。
Debian Linux系统:
sudo apt-get install ghc-prof
答案 1 :(得分:-1)
尝试
cabal update
cabal install ghc-prof