Shared object "libnetgraph.so.4" not found, required by "netstat"
tech-lists
tech-lists at zyxst.net
Thu May 14 01:16:10 UTC 2020
On Wed, May 13, 2020 at 10:00:23PM +0200, Per Hedeland wrote:
>
>Hm, netstat should be expected to require libnetgraph.so.4 - at least
>on 12.1-RELEASE:
>
>$ ldd /usr/bin/netstat
>/usr/bin/netstat:
> libkvm.so.7 => /lib/libkvm.so.7 (0x80026b000)
> libmemstat.so.3 => /usr/lib/libmemstat.so.3 (0x80027e000)
> libxo.so.0 => /lib/libxo.so.0 (0x800284000)
> libutil.so.9 => /lib/libutil.so.9 (0x8002a4000)
> libnetgraph.so.4 => /usr/lib/libnetgraph.so.4 (0x8002bb000)
> libc.so.7 => /lib/libc.so.7 (0x8002c2000)
> libelf.so.2 => /lib/libelf.so.2 (0x8006bb000)
>
>I.e. the problem is presumably not with netstat, but that
>/usr/lib/libnetgraph.so.4 doesn't actually exist on the specific VM. I
>don't know whether freebsd-update can be expected to re-create files
>that have "gone missing" other than due to changes between FreeBSD
>versions, but I wouldn't think so (AFAIK /usr/lib/libnetgraph.so.4 has
>been part of the release since at least 10.3-RELEASE - probably much
>longer, it's just the oldest version I have around).
Here's my ldd output from the affected vm:
root at REDACTED:~ # ldd /usr/bin/netstat
/usr/bin/netstat:
libkvm.so.7 => /lib/libkvm.so.7 (0x80026b000)
libmemstat.so.3 => /usr/lib/libmemstat.so.3 (0x80027e000)
libxo.so.0 => /lib/libxo.so.0 (0x800284000)
libutil.so.9 => /lib/libutil.so.9 (0x8002a4000)
libnetgraph.so.4 => not found (0)
libc.so.7 => /lib/libc.so.7 (0x8002bb000)
libelf.so.2 => /lib/libelf.so.2 (0x8006b4000)
root at REDACTED:~ #
>Does it work to run netstat outside of cron?
No.
root at REDACTED:~ # netstat
ld-elf.so.1: Shared object "libnetgraph.so.4" not found, required by "netstat"
root at REDACTED:~ #
Maybe the "fix" would be to copy libnetgraph.so.4 from another vm. But what's
worrying for me is, how was this file "lost" in the first place? Hardly any
console/ssh interaction is used on this particular vm. It hosts a https web
service, sends email (it's not an email relay though), has very wrapped sshd
access, and that's it.
--
J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20200514/ef33db7d/attachment.sig>
More information about the freebsd-questions
mailing list