加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

在Windows 7上的Haskell平台中使用Curl

发布时间:2020-12-14 05:36:18 所属栏目:Windows 来源:网络整理
导读:我正在尝试在我的项目中使用’import Text. XML.HXT.Curl’,这样我就可以访问在线文件(一些xml文件). 所以我得到的错误是: Could not find module `Text.XML.HXT.Curl': Use -v to see a list of the files searched for. 我试过了 : :! cabal install cur
我正在尝试在我的项目中使用’import Text. XML.HXT.Curl’,这样我就可以访问在线文件(一些xml文件).

所以我得到的错误是:

Could not find module `Text.XML.HXT.Curl':
    Use -v to see a list of the files searched for.

我试过了 :

:! cabal install curl

但我得到一个错误,它必须在unix或cygwin上,所以我继续安装cygwin,现在它说:

checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
cabal: Error: some packages failed to install:
curl-1.3.7 failed during the configure step. The exception was:
ExitFailure 77

:! gcc -version
Access is denied

我尝试下载curl包并使用cmd:runHaskell Setup.hs configure进行安装,但是我得到了这个:

Setup.hs: Missing dependency on a foreign library:
Missing C library: curl
This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version)

尝试在cygwin中安装gcc,g,libcurl,make仍然失败.

尝试安装mingw / mysis,我也失败了.关于curl / curl.h缺失的东西.

有没有人成功,可以告诉我他是怎么做到的?

解决方法

在Windows上安装curl可能很棘手.但你可以尝试 hxt-http包.它基于本机HTTP包,不需要外部依赖. AFAIK它将在Windows上开箱即用.

小注意:要使用curl和hxt,需要安装hxt-curl包.但是,是的,它不会有帮助,因为它取决于卷曲包:(

所以,我的答案实际上是关于“在Windows上使用hxt”,而不是“在Windows上使用curl”.你可以忽略它,以防它没有帮助你.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读