Haskell重新安装基础并启用分析

x8diyxa7  于 2023-06-30  发布在  其他
关注(0)|答案(3)|浏览(138)

我正在尝试按照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?*
drnojrws

drnojrws1#

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

Debian Linux系统:

sudo apt-get install ghc-prof

k2arahey

k2arahey2#

如果你使用的是stack,那么你可以

stack build --profile

参考:https://github.com/commercialhaskell/stack/issues/2285

vcirk6k6

vcirk6k63#

试试看

cabal update
cabal install ghc-prof

相关问题