1

I have installed gnupg from the official Solaris 11 repository, but am experiencing library issues. This is the error I am getting:

ld.so.1: gpg2: fatal: relocation error: file /usr/lib/libreadline.so.5: symbol tgetent: referenced symbol not found

See more information here:

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) <john@doe.com>
ssb 2048g/2BE06126 2010-11-25

bash-4.1$ gpg2 --edit-key john@doe.com
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) <john@doe.com>

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

Please let me know if I have to provide more information!

6
  • tgetent() is a curses call. Perhaps libreadline is linked against ncurses. Try installing it.
    – Flup
    Jul 29 '13 at 15:41
  • ncurses is already installed.
    – ujjain
    Jul 30 '13 at 7:29
  • Is it in the library paths returned by crle?
    – Flup
    Jul 30 '13 at 9:22
  • Yes. Default Library Path (ELF): /lib:/usr/lib (system default)
    – ujjain
    Aug 2 '13 at 11:49
  • Does ldd /usr/lib/libreadline.so.5 give anything useful?
    – Flup
    Aug 2 '13 at 12:30
4

This is a known bug in gpg2 in Solaris 11.0 (aka Solaris 11 11/11), originally filed as Sun bug 7098984, now known as bug 15747076 in the Oracle bug tracking system [Oracle support account required to view].

It’s fixed in Solaris 11.1 and later releases. For Solaris 11.0, this workaround helps in some cases (but not if you're using pfexec/sudo/etc.):

env LD_PRELOAD_32=/usr/lib/libcurses.so.1 gpg2
1
  • This is the working solution.
    – ujjain
    Aug 13 '13 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.