在linux mint上缺少chart-cairo的依赖关系17 [英] Missing dependencies for chart-cairo on linux mint 17

查看:222
本文介绍了在linux mint上缺少chart-cairo的依赖关系17的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我第一次遇到这个问题的时候,我试图在Haskell中获得glade支持。



有同样的问题,但它纯粹是为了好玩,所以我放过它。



这次我试图使用 Haskell Chart 可视化图表。



第四步发生问题 cabal install chart-cairo



我使用GHC版本7.6.3,cabal版本1.16.0.2,gtk2hs-buildtools版本0.12.4-2ubuntu1(来自软件包管理器),gtk2hsC2hs版本0.13.6(这是glade需要大于等于0.13的地方.8,但我找不到更新的版本)



到目前为止我尝试过的东西:


  1. 从包管理器下载gtk2hs-buildtools后,我更新了cabal并从命令行安装了这些工具。

  2. 在$ PATH的前面添加了$ HOME / .cabal / bin(在gtk正确安装之后) cabal install chart-cairo gets this this错误消息

    pre $ $ $ $ $解析依赖关系...
    编译SetupWrapper(/tmp/cairo-0.13.0.2) -19862 / cairo-0.13.0.2 / SetupWrapper.hs,/tmp/cairo-0.13.0.2-19862/cairo-0.13.0.2/dist/setup/SetupWrapper.o)
    [2之2]编译Main( /tmp/cairo-0.13.0.2-19862/cairo-0.13.0.2/dist/setup/setup.hs,/tmp/cairo-0.13.0.2-19862/cairo-0.13.0.2/dist/setup/Main.o)
    编译Gtk2HsSetup(Gtk2HsSetup.hs,dist / setup- wrapper / Gtk2HsSetup.o)
    [2的2]编译Main(SetupMain.hs,dist / setup-wrapper / Main.o)
    链接dist / setup-wrapper / setup ...
    配置cairo-0.13.0.2 ...
    构建cairo-0.13.0.2 ...
    预处理库cairo-0.13.0.2 ...
    [编译Graphics.Rendering .Cairo.Matrix(dist / build / Graphics / Rendering / Cairo / Matrix.hs,dist / build / Graphics / Rendering / Cairo / Matrix.o)
    [2/18]编译Graphics.Rendering.Cairo.Types(dist / build / Graphics / Rendering / Cairo / Types.hs,dist / build / Graphics / Rendering / Cairo / Types.o)
    [3 18]编译Graphics.Rendering.Cairo.Internal.Utilities(dist / build / Graphics / Rendering / Cairo / Internal / Utilities.hs,dist / build / Graphics / Rendering / Cairo / Internal / Utilities.o)

    Graphics / Rendering / Cairo / Internal / Utilities.chs:24:42:
    模块`Data.Text.Foreign'不会导出`withCStringLen'
    无法安装cairo-0.13.0.2
    cabal:错误:某些软件包未能安装:
    Chart-cairo-1.3.2取决于未能安装的cairo-0.13.0.2。
    cairo-0.13.0.2在建设阶段失败。例外是:
    ExitFailure 1


  3. pkg- config cairo --modversion 告诉我我的版本是1.13.1(比0.13.0.2更新?)


$ b

解决方案

我自己试了一下,并且碰到了一些我能克服的障碍......也许你遇到了同样的问题。

由于某些原因,某些依赖项不会自动安装。但手动安装很容易。试试这个:

  cabal install alex 
cabal install gtk2hs-buildtools
cabal install cairo
cabal install chart-cairo

一般情况下,如果您在cabal输出中看到类似以下内容的错误消息在您的文章中发现一行

 未能安装cairo-0.13.0.2 

手动尝试安装是个好主意。虽然依赖关系应该算出来,但我遇到过许多他们不知道的情况(我认为它可能与cabal安装命令行工具有关,但从未完全查看过它)。在这个特殊情况下,这就是我所做的,但我必须连续四次上链......


I'm struggling to install GTK / gtk2hs binding on Linux Mint 17.

The first time I encountered this problem was when I tried to get glade support in Haskell.

There were the same problems but it was purely for fun so I let it be.

This time I was trying to visualize a graph with Haskell Chart.

The problem occured in the forth step cabal install chart-cairo

I'm using GHC version 7.6.3, cabal version 1.16.0.2, gtk2hs-buildtools version 0.12.4-2ubuntu1 (from the package manager), gtk2hsC2hs version 0.13.6 (this is where glade needs to have >=0.13.8, but I can't find a newer version)

Things I've tried so far:

  1. After downloading the gtk2hs-buildtools from the package manager I updated cabal and installed the tools from the command line

  2. Added the "$HOME/.cabal/bin" to the front of $PATH (after that gtk installed correctly)

  3. cabal install chart-cairo gets me this error message

    Resolving dependencies...    
    [1 of 2] Compiling SetupWrapper     ( /tmp/cairo-0.13.0.2-19862/cairo-0.13.0.2/SetupWrapper.hs, /tmp/cairo-0.13.0.2-19862/cairo-0.13.0.2/dist/setup/SetupWrapper.o )    
    [2 of 2] Compiling Main             ( /tmp/cairo-0.13.0.2-19862/cairo-0.13.0.2/dist/setup/setup.hs, /tmp/cairo-0.13.0.2-19862/cairo-0.13.0.2/dist/setup/Main.o )    
    Linking /tmp/cairo-0.13.0.2-19862/cairo-0.13.0.2/dist/setup/setup ...    
    [1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )    
    [2 of 2] Compiling Main             ( SetupMain.hs, dist/setup-wrapper/Main.o )    
    Linking dist/setup-wrapper/setup ...    
    Configuring cairo-0.13.0.2...    
    Building cairo-0.13.0.2...    
    Preprocessing library cairo-0.13.0.2...    
    [ 1 of 18] Compiling Graphics.Rendering.Cairo.Matrix ( dist/build/Graphics/Rendering/Cairo/Matrix.hs, dist/build/Graphics/Rendering/Cairo/Matrix.o )    
    [ 2 of 18] Compiling Graphics.Rendering.Cairo.Types ( dist/build/Graphics/Rendering/Cairo/Types.hs, dist/build/Graphics/Rendering/Cairo/Types.o )    
    [ 3 of 18] Compiling Graphics.Rendering.Cairo.Internal.Utilities ( dist/build/Graphics/Rendering/Cairo/Internal/Utilities.hs, dist/build/Graphics/Rendering/Cairo/Internal/Utilities.o )    
    
    Graphics/Rendering/Cairo/Internal/Utilities.chs:24:42:    
        Module `Data.Text.Foreign' does not export `withCStringLen'    
    Failed to install cairo-0.13.0.2    
    cabal: Error: some packages failed to install:    
        Chart-cairo-1.3.2 depends on cairo-0.13.0.2 which failed to install.    
        cairo-0.13.0.2 failed during the building phase. The exception was:    
        ExitFailure 1    
    

  4. pkg-config cairo --modversion tells me I have the version 1.13.1 (which is newer than 0.13.0.2?)

解决方案

I just tried it myself, and hit some snags that I was able to overcome.... Perhaps you are having the same problem.

For some reason, some dependencies would not automatically install. It is easy to install them by hand though. Try this:

cabal install alex
cabal install gtk2hs-buildtools
cabal install cairo
cabal install chart-cairo

In general, if you see an error message in your cabal output like the following line in your post

Failed to install cairo-0.13.0.2   

it is a good idea to try the install manually. Although dependencies are supposed to be worked out, I've run into many cases where they don't (I think it might have to do with cabal installing command line tools, but have never looked into it fully). In this particular case, that is what I did, but I had to go up the chain 4 times....

这篇关于在linux mint上缺少chart-cairo的依赖关系17的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆