LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-13-2005, 10:25 AM   #1
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Rep: Reputation: 30
how to know which package uses a library?


dear all,

i'm into /var/log/packages and am searching to find which package(s) use a particular library. is there a way to do so without cat every single file and see if in its list the library is shown?

thank you...

aj.
 
Old 05-13-2005, 10:29 AM   #2
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
I think you can find what libraries a program uses by using ldd. Say for xmms,
Code:
ldd /usr/bin/xmms
would give out
Code:
        linux-gate.so.1 =>  (0xffffe000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40029000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40032000)
        libXxf86vm.so.1 => /usr/X11R6/lib/libXxf86vm.so.1 (0x4004a000)
        libxmms.so.1 => /usr/lib/libxmms.so.1 (0x4004f000)
        libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x4005c000)
        libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0x4017a000)
        libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x401ab000)
        libgthread-1.2.so.0 => /usr/lib/libgthread-1.2.so.0 (0x401af000)
        libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x401b2000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x401d3000)
        libdl.so.2 => /lib/libdl.so.2 (0x40225000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40229000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40237000)
        libm.so.6 => /lib/libm.so.6 (0x40302000)
        libc.so.6 => /lib/libc.so.6 (0x40325000)
        /lib/ld-linux.so.2 (0x40000000)
EDIT: Hmm, and i just noticed you want the opposite of that...
 
Old 05-13-2005, 10:29 AM   #3
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
grep libblah /var/log/packages/*

?

But that will tell you what packages include the given library, not use it. Which is perhaps not what you want?

Last edited by Nobber; 05-13-2005 at 10:31 AM.
 
Old 05-13-2005, 10:38 AM   #4
acidjuice
Member
 
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320

Original Poster
Rep: Reputation: 30
i get:
Code:
/usr/lib64# grep libglib-2.0* /var/log/packages/*
Binary file libglib-2.0.so.0.600.0 matches
/var/log/packages/aaa_elflibs-1.0.0-x86_64-1:usr/lib64/libglib-2.0.so.0.600.0
if this means that only aaa_elflibs contains the libglib2 then this is exactly what i needed
 
Old 05-13-2005, 10:56 AM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Do no add a '*' in the grep pattern or quote it with ' ' if you need it

In your case, the shell expanded the * to all files in current dir, so
grep found a file which was on the current dir when you run this
command

There should not be binary files in /var/log/packages
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
message "Problem during installation: x package needed for (installed) x package frayed2 Linux - Newbie 1 04-24-2005 07:05 PM
adding a bulit in library to my library lg3 Linux - Software 1 10-17-2004 08:19 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM
How to create a .deb library package? FloFri Debian 3 05-03-2004 11:12 AM
what is the function library of the basic graphics library in rethat9.0? zerwolve Red Hat 0 04-29-2004 09:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration