【问题标题】:GHCi runtime linker: fatal errorGHCi 运行时链接器:致命错误
【发布时间】:2015-10-08 14:21:07
【问题描述】:

我已经安装了 gtk。两个模块 System.Console.Readline 和 Graphics.UI.Gtk 分开正常工作。但是当我在同一代码中导入两个模块时,当 ghci 加载所有包时,显示:

Loading package array-0.4.0.0 ... linking ... done.
Loading package deepseq-1.3.0.0 ... linking ... done.
Loading package containers-0.4.2.1 ... linking ... done.
Loading package bytestring-0.9.2.1 ... linking ... done.
Loading package transformers-0.4.3.0 ... linking ... done.
Loading package mtl-2.2.1 ... linking ... done.
Loading package text-1.2.0.4 ... linking ... done.
Loading package utf8-string-1.0.1.1 ... linking ... done.
Loading package cairo-0.13.1.0 ... linking ... done.
Loading package glib-0.13.2.1 ... linking ... done.
Loading package gio-0.13.1.0 ... linking ... done.
Loading package filepath-1.3.0.0 ... linking ... done.
Loading package old-locale-1.0.0.4 ... linking ... done.
Loading package time-1.4 ... linking ... done.
Loading package unix-2.5.1.0 ... linking ... done.
Loading package directory-1.2.4.0 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package process-1.2.3.0 ... linking ... done.
Loading package pango-0.13.1.0 ... linking ... done.
Loading package gtk-0.13.9 ... linking ... done.
Loading package old-time-1.1.0.0 ... linking ... done.
Loading package directory-1.1.0.2 ... 

GHCi runtime linker: fatal error: I found a duplicate definition for symbol
   __hscore_S_IXUSR
whilst processing object file
   /usr/lib/ghc/directory-1.1.0.2/HSdirectory-1.1.0.2.o
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
GHCi cannot safely continue in this situation.  Exiting now.  Sorry.

感谢您的帮助!

【问题讨论】:

  • ghci 正在加载 directory 的两个版本:directory-1.2.4.0directory-1.1.0.2 我不认为它完全受支持。

标签: haskell directory gtk ghci


【解决方案1】:

详细说明 Yuras 的答案,要么取消注册未使用的包,要么隐藏它。 要取消注册,请使用(例如)

ghc-pkg unregister directory-1.1.0.2

你也可以在启动 ghci 时隐藏包。例如:

ghci -hide-package directory-1.1.0.2

【讨论】:

    猜你喜欢
    • 2010-12-01
    • 1970-01-01
    • 2017-12-30
    • 1970-01-01
    • 1970-01-01
    • 2015-09-21
    • 2017-02-24
    • 2020-05-23
    • 1970-01-01
    相关资源
    最近更新 更多