在cabal-install(Haskell平台)期间ld.exe无法找到库

时间:2016-06-30 22:15:39

标签: windows haskell cabal-install haskell-platform

我有Win 10 @ x64台计算机。我安装了Haskell Platform (HP) 8.0.1,但后来意识到我需要的软件包在构建GHC 8时会遇到麻烦。所以我卸载了HP 8并安装了HP 7.10.3。 cabal目录中的config文件仍然是8-installation,所以我手动删除了它(因为来自7.10.3的cabal无法解析它。)

现在我有问题cabal-安装任何意味着构建可执行文件的包。请参阅下面的构建cheapskate的示例。在构建yaml时,我有非常相似的消息,所以我想包装本身并没有特定的内容。正如我说任何包安装可执行文件的问题。

Linking dist\build\cheapskate\cheapskate.exe ...
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSxss-sanitize-0.3.5.7-HScF09TDCPn9q2HNPyr3jY
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSutf8-string-1.0.1.1-L8eKHa7Iv9q7FVKUYW6u4b
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHStagsoup-0.14-LkUWVoqDDljLCcz7bB5oLY
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHScss-text-0.1.2.1-EIrTNZIusX93HMVzZkp9UD
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSuniplate-1.6.12-DgRHum07M0vBMdvTsdo5gV
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSdata-default-0.7.1.1-3MPp9dYgnh90NQDAZx5NXx
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSdata-default-instances-old-locale-0.0.1-K6L8Um6XgJK7vZZFbrTNny
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSdata-default-instances-dlist-0.0.1-H5f5Qu8KYxpJlVdwCzbtAY
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSdlist-0.7.1.2-AO7XAasbAeyL0XLKeq1Aui
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSdata-default-instances-containers-0.0.1-Lel7wFldMDA1Zs74nVWKYF
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSdata-default-class-0.1.2.0-4JL8mCHvyuoKtdHwhiuMnt
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSblaze-html-0.8.1.1-89cVIlB12sFJRMi1lQAdfn
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSblaze-markup-0.7.0.3-7gHcQviMQE9GGsKcO1ZT0j
C:/Program Files/Haskell Platform/7.10.3/mingw/bin/ld.exe: cannot find -lHSblaze-builder-0.4.0.2-4HkRnVv5mkB1jlZDT6uaGq
collect2.exe: error: ld returned 1 exit status
cabal: Error: some packages failed to install:
cheapskate-0.1.0.5 failed during the building phase. The exception was:
ExitFailure 1

1 个答案:

答案 0 :(得分:0)

描述似乎对应于损坏的包数据库。

ghc-pkg check可以帮助查看是否是这种情况,ghc-pkg recache可能有助于解决问题。如果失败,则可以删除本地包数据库目录,该目录是ghc-pkg list列出的两个目录之一。