我是一个Haskell总新手,我正在做一个小项目,但我需要运行cabal install encoding
。但是,当我这样做,它给了我这个错误:在Haskell中,如何在Windows上安装编码包?
Configuring encoding-0.6.7.2...
setup.exe: Missing dependency on a foreign library:
* Missing (or bad) header file: system_encoding.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
cabal.exe: Error: some packages failed to install:
encoding-0.6.7.2 failed during the configure step. The exception was:
ExitFailure 1
如何解决这个问题?
作为一般规则,查看cabal文件中的标志可以指向有用的方法来避免需要外部库,这可能会牺牲某些API或某些功能。很高兴我能帮上忙! – fryguybob 2013-03-15 12:26:31
@fryguybob:你如何看待它? – 2013-03-15 16:47:35
在hackage页面的底部有一个链接,用于打开cabal文件的“包描述”。你也可以做'cabal unpack ...',然后将这个软件包解压缩到一个可以查看源代码的目录中。 'cabal info ...'也会列出这些标志,但并不包含他们所做的更多信息。 – fryguybob 2013-03-15 17:25:00