我在使用 repa-devil 包时遇到问题,我是从 cabal 安装的cabal install repa-devil
。
例如,这是我的 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
任何帮助,将不胜感激。