Date: Sat, 28 Jul 2001 01:18:41 -0500 From: Mike Meyer <mwm@mired.org> To: Drew Linsalata <drew@gothambus.com> Cc: questions@freebsd.org Subject: Re: Shared libraries out of whack. Message-ID: <15202.22849.179543.341861@guru.mired.org> In-Reply-To: <77458574@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Drew Linsalata <drew@gothambus.com> types:
> I've got a 3.5.1-RELEASE system on which my shared libs seem to have gotten
> out of whack, causing all kinds of inetd and mysql core dumps. I think the
> problem is that one of my admins tried mixing and matching files from other
> boxen running 4.0 and later. No good.
No kidding. You can run 3.X apps on 4.X with the compat libraries, but
not the other way around.
> Anyway, what's the best way to get this all back in line without wiping the
> OS and restoring everything from scratch? The offenders seem to be
> libc.so.4 and libutil.so.3.
Those are 4.x libraries. You might get applications that need those to
run properly, but I wouldn't care to try it on a production system.
> Any ideas from the experts? I have to admit that after 5 years of FreeBSD
> fun, I have never encountered this sort of thing before and I'm a bit
> stumped!
You need to chase down the things that use those two libraries - and
anything that uses libutil.so.3 should also use libc.so.4 - and
replace them with 3.X versions of the application. Here's a little
shell script that may help with that - I'm not sure how well it'll
work on 3.X:
#!/bin/sh
library=$1
shift
for file in "$@"
do
uses=`ldd $file | sed -n "s;$library ;;p"`
if [ "X$uses" != "X" ]
then
echo $file $uses
fi
done
If you save it as libcheck, typical usage is
"libcheck libc.so.4 /usr/local/bin/* 2> /dev/null"
You throw away standard error because it's full of complaints about
things that aren't dynamic executables.
<mike
--
Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15202.22849.179543.341861>
