haskell - OS X 上的 repa-devil 包的架构不匹配

标签 haskell cabal repa

我在使用 repa-devil 软件包时遇到问题,该软件包是我使用 cabal install repa-devil 从 cabal 安装的。

例如,这是我的 ghci 成绩单的一部分:

Prelude Data.Array.Repa.IO.DevIL> :m + Data.Array.Repa.IO.DevIL 
Prelude Data.Array.Repa.IO.DevIL> let x = readImage "out1.png"
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package array-0.4.0.0 ... linking ... done.
Loading package deepseq-1.3.0.0 ... linking ... done.
Loading package extensible-exceptions-0.1.1.4 ... linking ... done.
Loading package old-locale-1.0.0.4 ... linking ... done.
Loading package time-1.4 ... linking ... done.
Loading package random-1.0.1.1 ... linking ... done.
Loading package containers-0.4.2.1 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package QuickCheck-2.4.2 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package primitive-0.5.0.1 ... linking ... done.
Loading package vector-0.10.0.1 ... linking ... done.
Loading package repa-3.2.2.201204.1 ... linking ... done.
Loading package repa-devil-0.3.2.2 ... can't load .so/.DLL for: libIL.dylib (dlopen(libIL.dylib, 9): no suitable image found.  Did find:
    /usr/local/lib/libIL.dylib: mach-o, but wrong architecture)
Prelude Data.Array.Repa.IO.DevIL> 

在指定的 dylib 文件上运行 lipo:

edechter $ lipo -info /usr/local/lib/libIL.dylib
Non-fat file: /usr/local/lib/libIL.dylib is architecture: x86_64

uname -a 
Darwin helmholtz.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64

如有任何帮助,我们将不胜感激。

最佳答案

我相信您已经安装了32位版本的Haskell平台。但是,libdevil 是针对 64 位架构编译的。

您应该安装 64 位版本的 Haskell 平台(实际上不推荐)或编译 32 位库。

我个人使用 Haskell 的 64 位版本,没有太大问题(除了 yesod 和 ghc 7.4 的错误)。

关于haskell - OS X 上的 repa-devil 包的架构不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16291599/

相关文章:

haskell - `valueB` 是如何工作的?它总是返回相同的值?

haskell - 如何修复 cabal 安装错误

haskell - 是否可以重新启动 cabal 沙箱?

arrays - Haskell 中惰性数组的适当表示

haskell - 修复嵌套数组定义导致 "Performing nested parallel computation sequentially..."

haskell - Repa 2 和 3 API 之间的主要区别是什么?

haskell - 从子树中提取值

parsing - Haskell - Parsec 与状态

在 Haskell 中解析和 pretty-print 相同的文件格式

haskell - 如何在没有 Cabal 或 Cabal-Install 的情况下安装包/库?