/lib64/libtinfo.so.5:没有可用的版本信息

问题描述

我使用stack创建了一个新项目,并使用resolver: lts-16.12创建了一个项目。当使用.hs运行示例stack runghc src/MyExample.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_VERBOSELD_DEBUGLD_WARN,但是没有任何作用。

我没有安装任何文件的权限来修复库本身。知道是否可以/如何代替这些消息吗?还是任何其他非侵入式修复程序?

解决方法

您正在使用的发行版似乎已构建了没有符号版本控制的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

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...