I'm trying to find the package that installs libnss_mdns4_minimal.so.2
using dpkg -S
. The output says no path found
when the file path begins with /usr/lib/
but succeeds when it begins with /lib/
.
I'm using Ubuntu 22.04 Server.
$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 22.04.4 LTSRelease: 22.04Codename: jammy
To find the location of the file, I ran the following commands:
$ sudo updatedb$ locate mdns4_minimal/usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
Next, I used dpkg -S
to find the package that installed libnss_mdns4_minimal.so.2
. The output states: no path found matching pattern
.
$ dpkg -S /usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2dpkg-query: no path found matching pattern /usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
However, the following succeeds:
$ dpkg -S /lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2libnss-mdns:amd64: /lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
I notice that /lib
is a symlink to /usr/lib
:
$ ls -l /liblrwxrwxrwx 1 root root 7 Mar 19 2023 /lib -> usr/lib
I don't understand why no path was found
when using the full path /usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
, yet succeeds when using /lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
. Isn't the file the same no matter whether I'm referencing via the direct path or the via the symlink?
Can someone explain?