Shared object "" not found, required by "netstat"

Per Hedeland per at
Thu May 14 09:10:21 UTC 2020

On 2020-05-14 03:15, tech-lists wrote:
> On Wed, May 13, 2020 at 10:00:23PM +0200, Per Hedeland wrote:
>> Hm, netstat should be expected to require - at least
>> on 12.1-RELEASE:
>> $ ldd /usr/bin/netstat
>> /usr/bin/netstat:
>> => /lib/ (0x80026b000)
>> => /usr/lib/ (0x80027e000)
>> => /lib/ (0x800284000)
>> => /lib/ (0x8002a4000)
>> => /usr/lib/ (0x8002bb000)
>> => /lib/ (0x8002c2000)
>> => /lib/ (0x8006bb000)
>> I.e. the problem is presumably not with netstat, but that
>> /usr/lib/ 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/ 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:
> => /lib/ (0x80026b000)
> => /usr/lib/ (0x80027e000)
> => /lib/ (0x800284000)
> => /lib/ (0x8002a4000)
> => not found (0)

This is the expected output if /usr/lib/ doesn't

> => /lib/ (0x8002bb000)
> => /lib/ (0x8006b4000)
> root at REDACTED:~ #
>> Does it work to run netstat outside of cron?
> No.
> root at REDACTED:~ # netstat
> Shared object "" not found, required by "netstat"
> root at REDACTED:~ #
> Maybe the "fix" would be to copy from another vm.

I think so - maybe do a 'ls -l /usr/lib/' first to
verify that it really is *missing*.

> 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.

May be hard/impossible to figure out at this point... I'd first of all
try to find out whether it was missing from day one, which would imply
an installation problem (e.g. full disk?) - or if not, try to find out
*when* it went missing, and check logs around that time (if still
available) for any hints. I.e. pretty obvious stuff, and definitely
not guaranteed to give any result.


More information about the freebsd-questions mailing list