There are many times with we get .so.2 linked library error, this is because of the missing package that provides the shared library files. To find out with package provides which shared libraries.
Go to the following link, in the search field select Provides and give library file name
http://rpm.rutgers.edu/rpm2php/?searchby=provides&searchval=libiconv.so.2
The search will provide you package name to be installed.
The following example show how this works
Example:
bash-3.00# gpg –import mirror
ld.so.1: gpg: fatal: libiconv.so.2: open failed: No such file or directory
Killed
In the given example there’s a libiconv.so.2 error. To find out the dependencies of the application use
ldd : list dynamic dependencies of executable files or shared objects.
bash-3.00# ldd /usr/local/bin/gpg
libiconv.so.2 => (file not found)
libresolv.so.2 => /usr/lib/libresolv.so.2
libz.so => /usr/lib/libz.so
libreadline.so.5 => (file not found)
libcurses.so.1 => /usr/lib/libcurses.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /lib/libmp.so.2
libmd5.so.1 => /lib/libmd5.so.1
libscf.so.1 => /lib/libscf.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libm.so.2 => /lib/libm.so.2
/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
/platform/SUNW,Sun-Blade-100/lib/libmd5_psr.so.1
As you can see there are two dependencies missing for executable file gpg
libiconv.so.2 => (file not found)
libreadline.so.5 => (file not found)
Find out what packages provide both the libraries using link provided above
Library libiconv.so.2 is provided by libiconv package and
Library libreadline.so.5 is provided by readline5 package
Install both the package using pkg-get
bash-3.00# pkg-get install libiconv
Sorry, there are multiple versions possible
Please specify one, in the following syntax
pkg-get install libiconv-1.11
pkg-get install libiconv-1.8
pkg-get install libiconv-1.9.2
bash-3.00# pkg-get install libiconv-1.11
ERROR: information for “SMCliconv” was not found
No existing install of SMCliconv found. Installing…
trying ftp://ftp.sunfreeware.com/pub/freeware/sparc/5.10/libiconv-1.11-sol10-sparc-local.gz
–13:58:22– ftp://ftp.sunfreeware.com/pub/freeware/sparc/5.10/libiconv-1.11-sol10-sparc-local.gz
=> `/dev/fd/1′
Resolving ftp.sunfreeware.com… 66.193.208.66
Connecting to ftp.sunfreeware.com|66.193.208.66|:21… connected.
Logging in as anonymous … Logged in!
==> SYST … done. ==> PWD … done.
==> TYPE I … done. ==> CWD /pub/freeware/sparc/5.10 … done.
==> PASV … done. ==> RETR libiconv-1.11-sol10-sparc-local.gz … done.
Length: 1,464,363 (1.4M) (unauthoritative)
100%[==============================================================>] 1,464,363 239.47K/s ETA 00:00
13:58:28 (256.43 KB/s) – `/dev/fd/1′ saved [1464363]
Transferring <SMCliconv> package instance
Processing package instance <SMCliconv> from </var/spool/pkg>
libiconv(sparc) 1.11
Bruno Haible
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
8 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
Installing libiconv as <SMCliconv>
## Installing part 1 of 1.
/usr/local/bin/iconv
/usr/local/doc/libiconv/ABOUT-NLS
/usr/local/doc/libiconv/AUTHORS
/usr/local/doc/libiconv/COPYING.LIB
output truncated
[ verifying class <none> ]
Installation of <SMCliconv> was successful.
bash-3.00# pkg-get install readline
Sorry, there are multiple versions possible
Please specify one, in the following syntax
pkg-get install readline-5.0
pkg-get install readline-5.1
pkg-get install readline-5.2
bash-3.00# pkg-get install readline-5.2
ERROR: information for “SMCreadl” was not found
No existing install of SMCreadl found. Installing…
trying ftp://ftp.sunfreeware.com/pub/freeware/sparc/5.10/readline-5.2-sol10-sparc-local.gz
–13:59:22– ftp://ftp.sunfreeware.com/pub/freeware/sparc/5.10/readline-5.2-sol10-sparc-local.gz
=> `/dev/fd/1′
Resolving ftp.sunfreeware.com… 66.193.208.66
Connecting to ftp.sunfreeware.com|66.193.208.66|:21… connected.
Logging in as anonymous … Logged in!
==> SYST … done. ==> PWD … done.
==> TYPE I … done. ==> CWD /pub/freeware/sparc/5.10 … done.
==> PASV … done. ==> RETR readline-5.2-sol10-sparc-local.gz … done.
Length: 2,281,936 (2.2M) (unauthoritative)
100%[==============================================================>] 2,281,936 248.49K/s ETA 00:00
13:59:34 (206.49 KB/s) – `/dev/fd/1′ saved [2281936]
Transferring <SMCreadl> package instance
Processing package instance <SMCreadl> from </var/spool/pkg>
readline(sparc) 5.2
Lionel Cons et al
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
6 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
Installing readline as <SMCreadl>
## Installing part 1 of 1.
/usr/local/doc/readline/CHANGELOG
/usr/local/doc/readline/CHANGES
/usr/local/doc/readline/COPYING
/usr/local/doc/readline/INSTALL
/usr/local/doc/readline/MANIFEST
/usr/local/doc/readline/NEWS
/usr/local/doc/readline/README
/usr/local/doc/readline/USAGE
/usr/local/doc/readline/doc/Makefile
/usr/local/doc/readline/doc/Makefile.in
/usr/local/doc/readline/doc/fdl.texi
/usr/local/doc/readline/doc/history.0
/usr/local/doc/readline/doc/history.3
/usr/local/doc/readline/doc/history.dvi
/usr/local/doc/readline/doc/history.html
/usr/local/doc/readline/doc/history.info
/usr/local/doc/readline/doc/history.pdf
output truncated
[ verifying class <none> ]
Installation of <SMCreadl> was successful.
Now, you can proceed with your command
bash-3.00# gpg –import mirrors
gpg: key E12E9D2F: “Distribution Manager <dm@blastwave.org>” not changed
gpg: Total number processed: 1
gpg: unchanged: 1
There you are successful!!!!!












