我尝试安装threepenny-gui,并且可能在此过程中损坏了一些东西。我的问题是(1)我该如何解决这个问题,以及(2)当 cabal 发出有关可能重新安装的警告时,应该如何进行?
threepenny-gui 警告我它可能会破坏 regex-compat:
jeffreys-mbp:~ jbb$ cabal install threepenny-gui -fbuildExamples
cabal: The following packages are likely to be broken by the reinstalls:
regex-compat-0.95.1
Use --force-reinstalls if you want to install anyway.
我还没有在haskell中使用过正则表达式,所以这似乎值得冒险,我继续:
jeffreys-mbp:~ jbb$ cabal install threepenny-gui -fbuildExamples --force-reinstalls
这启动了一个发出此警告的过程:
Warning: The following packages are likely to be broken by the reinstalls:
regex-compat-0.95.1
但除此之外似乎有效。然后我尝试运行几个示例程序,但没有成功:
jefferys-mbp:samples jbb$ ./runhaskell Chat.hs
ghc: can't find a package database at ../.cabal-sandbox/*-packages.conf.d
jefferys-mbp:samples jbb$ ./runhaskell MissingDollars.hs
ghc: can't find a package database at ../.cabal-sandbox/*-packages.conf.d
jefferys-mbp:samples jbb$
我用谷歌搜索了那个错误,发现只有一页,我没有看到如何使用。
我想问题可能是我破坏了 regex-compat,所以我尝试重新安装它:
jefferys-mbp:samples jbb$ cabal install regex-compat
Resolving dependencies...
All the requested packages are already installed:
regex-compat-0.95.1
Use --reinstall if you want to reinstall anyway.
jefferys-mbp:samples jbb$ cabal install regex-compat --reinstall
Resolving dependencies...
In order, the following will be installed:
regex-compat-0.95.1 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
## It warned me that its suggestion is dangerous only AFTER I had acted on its suggestion.
Downloading regex-compat-0.95.1...
Configuring regex-compat-0.95.1...
Building regex-compat-0.95.1...
Installed regex-compat-0.95.1
Updating documentation index /Users/jbb/Library/Haskell/share/doc/index.html
jefferys-mbp:samples jbb$
我不知道是否重新安装了 regex-compat,但是threepenny-gui 中的示例仍然无法为我运行。
我在 2011 年初的 MBP 上运行 OS X Mavericks。在三便士之前,我尝试安装 wxWidgets 和 GTK,这两个似乎都成功了,但也不让我运行示例代码。这让我考虑购买另一台计算机并切换到 Linux。(在这台机器上安装 Linux 也让我望而却步。)