LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux Command needed (http://www.linuxquestions.org/questions/linux-newbie-8/linux-command-needed-340224/)

cherupop 07-05-2005 10:00 AM

linux Command needed
 
Hi guys

I know there is a command that exist in linux that allows you to see what are the libraries, drivers etc... that are needed for a specific program

I don't know if I'm being clear but is something like

# "command needed" realplayer

and then I get all the software that this application use when it's run.

Thanks
Cherupop :idea:

jtshaw 07-05-2005 10:21 AM

ldd will show you what libraries a program is linked against...

Example output:
Code:

j_shaw@jshaw ~ $ ldd /usr/bin/vim
        linux-gate.so.1 =>  (0xffffe000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb7f01000)
        libgpm.so.1 => /lib/libgpm.so.1 (0xb7efb000)
        libperl.so.1 => /usr/lib/libperl.so.1 (0xb7de5000)
        libutil.so.1 => /lib/libutil.so.1 (0xb7de1000)
        libc.so.6 => /lib/libc.so.6 (0xb7caa000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7c97000)
        libm.so.6 => /lib/libm.so.6 (0xb7c70000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7c6c000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb7c54000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7c26000)
        /lib/ld-linux.so.2 (0xb7f57000)

If a library isn't found it will show that as well:
Code:

j_shaw@jshaw ~ # ldd /usr/bin/vim
        linux-gate.so.1 =>  (0xffffe000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb7ef5000)
        libgpm.so.1 => not found
        libperl.so.1 => /usr/lib/libperl.so.1 (0xb7ddf000)
        libutil.so.1 => /lib/libutil.so.1 (0xb7ddb000)
        libc.so.6 => /lib/libc.so.6 (0xb7ca4000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7c91000)
        libm.so.6 => /lib/libm.so.6 (0xb7c6a000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7c66000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb7c4e000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7c20000)
        /lib/ld-linux.so.2 (0xb7f4b000)


cherupop 07-05-2005 10:26 AM

command needed
 
yeah that was the one that I was looking for.
Thanks a lot
cherupop

cherupop 07-05-2005 11:21 PM

so...
 
So now I have one more question

What if I wanna know if I have installed one of the librarys needed for a program before I installed
Lets say that the program needs libasound.so.2 , is there a command that tells me if I have that isntalled already or not so I can get it before

thanks again

cherupop

Ynot Irucrem 07-05-2005 11:33 PM

you could just do the following as root:
Code:

updatedb
locate libasound.so.2



All times are GMT -5. The time now is 08:03 PM.