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



我用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)

我读过这样的东西,可以确认有问题的图书馆:

$ 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:

看起来上面的消息是这样打印的:

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;
}

我尝试从这里设置/取消设置各种标志,如LD_VERBOSELD_DEBUGLD_WARN,但没有任何效果。

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

您使用的发行版似乎在没有符号版本控制的情况下构建了ncurses。我猜这是Fedora派生的东西,所以我提交了一个bug来更改它:

  • ncurses:请启用符号版本控制

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

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

这不需要root权限。

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

相关内容

  • 没有找到相关文章

最新更新