GHC找不到已安装的模块

Trismegistos

我的haskell安装找不到操作系统安装的字节串模块

$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m +Data.ByteString.Lazy

<no location info>:
Could not find module `Data.ByteString.Lazy'
It is not a module in the current program, or in any known package.

但是我已经使用yum安装了这个模块:

$ rpm -ql ghc-bytestring
/usr/lib64/ghc-7.6.3/bytestring-0.10.0.2
/usr/lib64/ghc-7.6.3/bytestring-0.10.0.2/libHSbytestring-0.10.0.2-ghc7.6.3.so
/usr/share/doc/ghc-bytestring
/usr/share/doc/ghc-bytestring/LICENSE

怎么了?

Trismegistos

这里的情况类似于C ++,您有在动态链接阶段使用的库和用于编译的标头。在Fedora中,像ghc-bytestring这样的包只是没有头文件的库。要安装标题,我必须安装ghc-bytestring-devel软件包。

关于Fedora 24的示例:

server.hs:7:8:
    Could not find module ‘Data.Text’
    Perhaps you meant Data.Set (from containers-0.5.5.1)
    Locations searched:
      Data/Text.hs
      Data/Text.lhs

因此,更改为user root,然后:

有什么包装?

# dnf search ghc|grep text

ghc-text.x86_64 : An efficient packed Unicode text type
ghc-boxes.x86_64 : 2D text pretty-printing library
ghc-pango.x86_64 : Binding to the Pango text rendering engine
ghc-css-text.x86_64 : CSS parser and renderer
ghc-hgettext.x86_64 : Haskell binding to libintl
ghc-attoparsec.x86_64 : Fast combinator parsing for bytestrings and text
ghc-text-devel.x86_64 : Haskell text library development files
ghc-blaze-textual.x86_64 : Fast rendering of common datatypes
ghc-css-text-devel.x86_64 : Haskell css-text library development files
ghc-hgettext-devel.x86_64 : Haskell hgettext library development files
ghc-blaze-textual-devel.x86_64 : Haskell blaze-textual library development files

那么安装了什么?

# rpm --query ghc-text
ghc-text-1.1.1.3-3.fc24.x86_64

# rpm --query ghc-text-devel
package ghc-text-devel is not installed

因此,让我们安装devel软件包。

# dnf install ghc-text-devel
Installed:
  ghc-text-devel.x86_64 1.1.1.3-3.fc24

...然后编译成功。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

GHC找不到已安装的模块

来自分类Dev

Pandoc“找不到模块...”已安装的模块

来自分类Dev

环境模块找不到已安装的模块

来自分类Dev

节点找不到已安装的mysql模块

来自分类Dev

已安装模块,但Python找不到它

来自分类Dev

Jupyter notebook 找不到已安装的模块

来自分类Dev

ghc-mod找不到用户安装的模块

来自分类Dev

ghc-mod找不到用户安装的模块

来自分类Dev

找不到此类模块“ GoogleMaps”,但已安装

来自分类Dev

pydispatch模块已安装,但仍然找不到

来自分类Dev

运行程序时找不到已安装的模块

来自分类Dev

找不到此类模块“ GoogleMaps”,但已安装

来自分类Dev

GHC在阴谋沙箱中找不到模块

来自分类Dev

找不到sed,但已安装

来自分类Dev

找不到sed,但已安装

来自分类Dev

找不到CMake,但已安装

来自分类Dev

已安装其他模块citext,但找不到类型“ citext”吗?

来自分类Dev

找不到Npm模块“ grunt-contrib-imagemin”,是否已安装?

来自分类Dev

找不到Npm模块“ grunt-contrib-imagemin”,是否已安装?

来自分类Dev

NixOS和ghc-mod-找不到模块

来自分类Dev

尽管已安装,但找不到内核头

来自分类Dev

找不到“六个”,但已安装

来自分类Dev

Bundler找不到耙,但似乎已安装

来自分类Dev

OSX gcc找不到已安装的库

来自分类Dev

xgterm找不到已安装的库

来自分类Dev

cmake找不到Java,但已安装

来自分类Dev

OSX gcc找不到已安装的库

来自分类Dev

找不到iwconfig,但已安装无线工具

来自分类Dev

dpkg即使已安装也找不到libicu