GHC在静态链接我的可执行文件时速度太慢,因此我想使用“-dynamic”选项进行测试。尽管cabal install mighttpd2
没问题,但以下两个命令会导致相同的错误。
$cabal install --ghc-options=-dynamic mighttpd2
$cabal install --enable-executable-dynamic mighttpd2
Linking dist/build/mkindex/mkindex ...
Preprocessing executable 'mightyctl' for mighttpd2-2.7.1...
Process.hs:11:8:
Could not find module `Data.Conduit.Process'
Perhaps you haven't installed the "dyn" libraries for package `process conduit-0.5.0.2'?
Use Perhaps you haven't installed the "dyn" libraries for package `process-conduit-0.5.0.2'?
Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
mighttpd2-2.7.1 failed during the building phase. The exception was:ExitFailure 1
答案 0 :(得分:4)
您需要安装mighttpd2
所依赖的所有库的动态版本。 cabal-install
正在抱怨process-conduit
的动态版本无法使用。您必须重新安装mighttpd2
的完整依赖关系树,并将--enable-shared --enable-executable-dynamic
传递给cabal-install
。