[Techtalk] finding libs not installed from packages

Rasjid Wilcox rasjidw at openminddev.net
Mon Nov 17 20:28:20 EST 2003


On Monday 17 November 2003 10:59, Carla Schroder wrote:
> On Sunday 16 November 2003 3:10 pm, Rasjid Wilcox wrote:
> > With rpm, wouldn't the -f option help?
> >
> > $ rpm -q -f /usr/lib/libBLT.so
> > blt-2.4y-167
> >
> > $ rpm -q -f /usr/local/lib/installwatch.so
> > file /usr/local/lib/installwatch.so is not owned by any package
> >
> > Not sure what the equivalent is with deb's.
>
> Well, yes, this would work- I'd like something that doesn't require
> hunting down and testing each lib individually. There must be a way to
> generate lists from both the package database, and the whole system,
> and then diff them, wouldn't you think?

Okay.  The following seems to work for me (SuSE 8.2):

$ rpm -qa | xargs rpm -ql | grep lib | grep "\.so" | sort | uniq > rpm.so.list
$ locate "lib" | grep "\.so" | sort | uniq > filesys.so.list
$ diff -u rpm.so.list filesys.so.list

Only looks for .so type files with lib somewhere in the pathname.  Adjust as 
required.  :-)

Cheers,

Rasjid.

-- 
Rasjid Wilcox
Canberra, Australia (UTC +10 hrs)
http://www.openminddev.net


More information about the Techtalk mailing list