【问题标题】:/lib64/libtinfo.so.5: no version information available/lib64/libtinfo.so.5:没有可用的版本信息
【发布时间】:2020-12-23 02:14:07
【问题描述】:

我使用stack 创建了一个新项目,该项目使用resolver: lts-16.12 创建了一个项目。当使用stack runghc src/MyExample.hs 运行示例.hs 文件时,它工作正常,但我在运行之前也得到了这些:

/home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/ghc: /lib64/libtinfo.so.5: no version information available (required by /home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/../haskeline-0.7.5.0/libHShaskeline-0.7.5.0-ghc8.8.4.so)
/home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/ghc: /lib64/libtinfo.so.5: no version information available (required by /home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/../ghc-8.8.4/libHSghc-8.8.4-ghc8.8.4.so)
/home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/ghc: /lib64/libtinfo.so.5: no version information available (required by /home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/../terminfo-0.4.1.4/libHSterminfo-0.4.1.4-ghc8.8.4.so)

我已经阅读了诸如this 之类的内容,并且可以确认有问题的库:

$ ll /lib64/libtinfo.so.5
lrwxrwxrwx. 1 root root 15 Aug 08 19:47 /lib64/libtinfo.so.5 -> libtinfo.so.5.9

没有VERDEF/.gnu.version_d:

$ readelf -V /lib64/libtinfo.so.5|grep gnu
Version symbols section '.gnu.version' contains 245 entries:
Version needs section '.gnu.version_r' contains 1 entries:

上面的消息好像打印了by this:

  if (__glibc_unlikely (map->l_info[VERSYMIDX (DT_VERDEF)] == NULL))
    {
      /* The file has no symbol versioning.  I.e., the dependent
     object was linked against another version of this file.  We
     only print a message if verbose output is requested.  */
      if (verbose)
    {
      /* XXX We cannot translate the messages.  */
      _dl_exception_create_format
        (&exception, DSO_FILENAME (map->l_name),
         "no version information available (required by %s)", name);
      goto call_cerror;
    }
      return 0;
    }

我尝试从here 设置/取消设置各种标志,例如LD_VERBOSE、LD_DEBUG、LD_WARN,但没有任何效果。

我无权安装任何东西来修复库本身。知道是否/如何可以抑制这些消息来代替它吗?或者任何替代的非侵入性修复?

【问题讨论】:

    标签: haskell ghc glibc haskell-stack ldd


    【解决方案1】:

    您使用的发行版似乎构建了没有符号版本控制的 ncurses。我猜它是 Fedora 派生的,所以我提交了一个错误来改变它:

    与此同时,您可以自己构建 ncurses,可能使用

    ./configure --prefix=/home/lpied/opt/ncurses --with-versioned-syms
    make
    make install
    

    这不需要root权限。

    并在你的shell配置中添加/home/lpied/opt/ncurses/lib64到LD_LIBRARY_PATH。

    【讨论】:

      猜你喜欢
      • 2022-06-15
      • 2016-02-07
      • 2023-03-19
      • 1970-01-01
      • 1970-01-01
      • 2020-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多