1. 运行命令cabal install glib时出现错误:

Cannot find gtk2hsC2hs
Please install `gtk2hs-buildtools` first and check that the install directory is in your PATH (e.g. HOME/.cabal/bin).

2. 运行命令cabal install gtk2hs-buildtools

Installed gtk2hs-buildtools-0.12.5.2

3. 重新运行命令cabal install glib,出现新的错误:

The program pkg-config version >=0.9.0 is required but it could not be found. 

4. 下载/安装GTK+ all-in-one bundle

a) 下载网址:http://www.gtk.org/download/win32.php,直接下载链接:http://win32builder.gnome.org/gtk+-bundle_3.6.4-20130921_win32.zip

b) 下载后,解压至一个文件夹,比如F:\GTK,并将该文件夹路径添加至PATH环境变量中

setx /M PATH "%PATH%;F:\GTK"

5. 重新运行命令cabal install glib,出现新的错误:

The pkg-config package glib-2.0 is required but it could not be found.

6. 运行命令pkg-config --modversion glib-2.0,出现错误:

ackage glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found

7. 在F:\GTK中添加glib-2.0.pc文件,文件内容如下:

prefix=F:\GTK
exec_prefix=F:\GTK
libdir=F:\GTK
includedir=F:\GTK glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums Name: GLib
Description: C Utility Library
Version: 2.0
Libs: -L${libdir} -lglib-2.0
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include

8. 重新运行命令cabal install glib,又出现新的错误:

The pkg-config package gobject-2.0 is required but it could not be
found.

在F:\GTK中添加gobject-2.0.pc文件

9. 重新运行命令cabal install glib,又出现新的错误:

Missing dependencies on foreign libraries:
* Missing C libraries: glib-2.0, gobject-2.0
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.

就研究到这个地方,问题未得到解决。。。

Haskell中cabal install glib遇到的问题的更多相关文章

  1. haskell中的monad

    monad本意是单子.在haskell中,第一个接触的基本都是IO action,通过把IO动作包装起来我们能很方便的与现实世界进行数据交换.但其实monad的用途不止如此,monad还能讲一系列操作 ...

  2. haskell中的do

    在haskell中,有一个do的语句专门用来做一些不那么“干净”的事情,比如读写都需要用do来开头 一开始以为do的作用是做monad,后来发现是错误的,其实do做的事情是包裹一个顺序操作 比如在如下 ...

  3. maven项目,导入的jar包,没有包含在pom文件中,install失败

    [INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[ ...

  4. Linux 中的 Install命令

    Linux 中的 Install命令 更新时间:2017年09月25日 16:51:45   投稿:mrr   我要评论 install命令的作用是安装或升级软件或备份数据,它的使用权限是所有用户. ...

  5. npm中npm install 始终出错解决办法

    npm中npm install 始终出错解决办法 错误信息: C:\Windows\System32>npm install -g gulp npm ERR! Windows_NT 6.1.76 ...

  6. linux中yum install 命令无效

    版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/lx_Frolf/article/deta ...

  7. 关于人人开源renren-fast-vue 中npm install各种报错的解决方案

    首先吐槽一下,因为这个问题我整了好几天,把报错信息复制百度,试遍了各种方法,node.js我是卸载了安装,安装了卸载,甚至renren-fast-vue我也删了再下,然后再删,无限循环.然而没有什么软 ...

  8. eclipse中maven install和build,clean

    eclipse插件,m2eclipse 1.maven install相当于maven原生的命令: mvn install 2.aven build是 m2eclipse这个插件自己创造的概念,需要你 ...

  9. haskell中的cps

    cps全称叫continuation passing style,简要来讲就是告诉函数下一步做什么的递归方式,由于普通递归有栈溢出的问题,而cps都是尾递归(tail recursion),尾递归则是 ...

随机推荐

  1. 在不指定特殊属性的情况下,哪几种HTML标签可以手动输入文本:()

    A. <TEXTAREA></TEXTAREA> B. <INPUT type=”text”/> C. <INPUT type=”hidden”/> D ...

  2. 转载:【原译】Erlang性能的八个误区(Efficiency Guide)

    转自:http://www.cnblogs.com/futuredo/archive/2012/10/16/2725770.html The Eight Myths of Erlang Perform ...

  3. 【matlab】error:试图访问 im2(1,1211);由于 size(im2)=[675,1210],索引超出范围。

    试图访问 im2(1,1211):由于 size(im2)=[675,1210],索引超出范围. 出错 dect (line 14) if abs((im2(i,j))-(im1(i,j)))> ...

  4. POJ 1038 Bug Integrated Inc(状态压缩DP)

    Description Bugs Integrated, Inc. is a major manufacturer of advanced memory chips. They are launchi ...

  5. 第二篇:一个经典的比喻( 关于TCP连接API )

    前言 编程是对现实世界的模拟,网络通信自然也是对现实世界通信的模拟.可以将网络通信中使用的各种API和对现实世界中的各种通信设备进行通讯的操作进行对比以加深理解. 对比 socket() 函数 vs ...

  6. iOS设计模式之类族(class cluster)

    类族模式在UIKit(user interface framework)使用的范围已经远远超过我们的想象,比如,UIButton,NSArray,NSString,NSNumber等, 例如NSNum ...

  7. Swift-Debug下打印函数名和行数

    1.Build Settings ->搜索 Swift compiler -> OTHER_SWIFT_FLAGS = -D DEBUG 2.设置DEBUG函数 配置好后就可以愉快的进行调 ...

  8. GROW

    经理今天介绍了一下,GROW,就给他放上来了:   有一个辅导的方法 叫做 GROW (G:goal:R:reality:O:option:W:will)这个辅导方法是这样的,客观地给自己或者别人提问 ...

  9. 【Thinkphp5】结合layer弹窗 定制操作结果页面

    1 打开应用公共文件页面    appliction/common.php,编写以下代码 注意: 成功消息的绿色背景部分是iframe 框架写法,如果是普通页面.就吧parent去除,改为: self ...

  10. ReactNative For Android 框架启动核心路径剖析

    版权声明:本文由王少鸣原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/144 来源:腾云阁 https://www.qclo ...