Btw, this is how I figured this out. I removed the icu4c package to simulate breakage:
Code:
root@mojo:~/armedslack/distrotools# ldd $(which gpg2) | grep "not found" | awk '{print $1}'
libicui18n.so.64
libicuuc.so.64
libicudata.so.64
We know that this library is missing.
Is it directly linked to gpg2?
Code:
root@mojo:~/armedslack/distrotools# readelf -d $(which gpg2) | grep NEEDED
0x00000001 (NEEDED) Shared library: [libz.so.1]
0x00000001 (NEEDED) Shared library: [libbz2.so.1]
0x00000001 (NEEDED) Shared library: [libsqlite3.so.0]
0x00000001 (NEEDED) Shared library: [libdl.so.2]
0x00000001 (NEEDED) Shared library: [libgcrypt.so.20]
0x00000001 (NEEDED) Shared library: [libgpg-error.so.0]
0x00000001 (NEEDED) Shared library: [libreadline.so.8]
0x00000001 (NEEDED) Shared library: [libassuan.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.6]
root@mojo:~/armedslack/distrotools#
No, so it must be linked directly to (at least) one of the above.
Because ldd doesn't tell us where those libraries are (well it can, but it seems to be more work parsing it than just finding them), we need to find the path to each library (most will be in /usr/lib). Fortunately, the number of system-wide search paths is usually only a handful.
Code:
root@mojo:~/armedslack/distrotools# ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 | sed -e 's?SEARCH_DIR("?\ ?g' -e 's?")? ?g' | xargs
/usr/arm-slackware-linux-gnueabihf/lib /usr/local/lib /lib /usr/lib
Let's look at the first one:
Code:
root@mojo:~/armedslack/distrotools# objdump -x /usr/lib/libz.so.1 | grep NEEDED
NEEDED libc.so.6
That terminates at glibc, and has no other direct dependencies. It's not this one.
Let's go to the 3rd (because I know it's this one ;-) )
Code:
root@mojo:~/armedslack/distrotools# objdump -x /usr/lib/libsqlite3.so.0 | grep NEEDED
NEEDED libdl.so.2
NEEDED libicui18n.so.64
NEEDED libicuuc.so.64
NEEDED libicudata.so.64
NEEDED libm.so.6
NEEDED libz.so.1
NEEDED libpthread.so.0
NEEDED libc.so.6
There we have it!
Which package does it belong to? No point looking on the system because it's already missing (unless the file was deleted outside of the awareness of pkgtools).
Let's look in the MANIFEST.bz2 file within the 'slackware' package series directory:
Code:
root@mojo:~/armedslack/distrotools# cd ~/ac/slackware
root@mojo:~/armedslack/distrotools# bzcat MANIFEST.bz2 | grep libicuuc.so.64
-rwxr-xr-x root/root 1526236 2019-04-19 19:49 usr/lib/libicuuc.so.64.2
And you can find which package it is there, and install or reinstall, or upgrade it.
It may be that it's also directly linked to a few other packages, so you may need to iterate through this a few times before it's fixed.