![Solaris 11 上的 Gnupg 库问题](https://linux22.com/image/615568/Solaris%2011%20%E4%B8%8A%E7%9A%84%20Gnupg%20%E5%BA%93%E9%97%AE%E9%A2%98.png)
我已经从官方 Solaris 11 存储库安装了 gnupg,但遇到了库问题。这是我收到的错误:
ld.so.1: gpg2: fatal: relocation error: file /usr/lib/libreadline.so.5: symbol tgetent: referenced symbol not found
查看更多信息:
bash-4.1$ gpg2 --list-secret-keys
Warning: using insecure memory!
/www/shared/.gnupg/secring.gpg
------------------------------
sec 1024D/E6A51C54 2010-11-25
uid John Doe (jdoe) <[email protected]>
ssb 2048g/2BE06126 2010-11-25
bash-4.1$ gpg2 --edit-key [email protected]
gpg (GnuPG) 2.0.17; Copyright (C) 2011 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Warning: using insecure memory!
Secret key is available.
pub 1024D/E6A51C54 created: 2010-11-25 expires: never usage: SC
trust: unknown validity: unknown
sub 2048g/2BE06126 created: 2010-11-25 expires: never usage: E
[ unknown] (1). John Doe (jdoe) <[email protected]>
ld.so.1: gpg2: fatal: relocation error: file /usr/lib/libreadline.so.5: symbol tgetent: referenced symbol not found
Killed
bash-4.1$ pkg list |grep readl
library/readline 5.2-0.175.0.0.0.2.537 i--
bash-4.1$ pkg list |grep gnup
crypto/gnupg 2.0.17-0.175.0.0.0.2.537 i--
bash-4.1$ ls -al /usr/lib/libreadline.so.5
-r-xr-xr-x 1 root bin 412864 Jun 20 2012 /usr/lib/libreadline.so.5
bash-4.1$ which gpg2
/usr/bin/gpg2
bash-4.1$ ldd /usr/bin/gpg2
libc.so.1 => /lib/libc.so.1
libz.so.1 => /lib/libz.so.1
libbz2.so.1 => /usr/lib/libbz2.so.1
libresolv.so.2 => /lib/libresolv.so.2
libreadline.so.5 => /usr/lib/libreadline.so.5
libgcrypt.so.11 => /usr/lib/libgcrypt.so.11
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0
libassuan.so.0 => /usr/lib/libassuan.so.0
libsocket.so.1 => /lib/libsocket.so.1
libnsl.so.1
如果我需要提供更多信息,请告诉我!
答案1
这是 Solaris 11.0(又名 Solaris 11 11/11)中 gpg2 的一个已知错误,最初被归档为 Sun bug 7098984,现在称为Oracle 错误跟踪系统中的错误 15747076[需要 Oracle 支持帐户才能查看]。
该问题已在 Solaris 11.1 及更高版本中得到修复。对于 Solaris 11.0,此解决方法在某些情况下有用(但如果您使用 pfexec/sudo/等则无用):
env LD_PRELOAD_32=/usr/lib/libcurses.so.1 gpg2