1832973 Members
2399 Online
110048 Solutions
New Discussion

Re: Finding depends

 
SOLVED
Go to solution
John Meissner
Esteemed Contributor

Finding depends

I have a program on Red Hat 7.3 called usernet that monitors network traffic. On another Linux box I don't have this. I copied the file over and it complained that it's dependent files were "such and such" I copied them and it the program worked. I can't remember what file I copied to make it work and I'd like to document this. is there a way to find out what a programs depends are?
All paths lead to destiny
5 REPLIES 5
Kodjo Agbenu
Honored Contributor
Solution

Re: Finding depends

Hi,

Try "ldd program"

It will give you all shared libraries that the program depends on.

Good luck.

Kodjo
Learn and explain...
Steven E. Protter
Exalted Contributor

Re: Finding depends

If you ever want an update you'll need to figure out where it came from.

I've gone through my redhat machines, but not the CD's and found nothing.

If it by chance did come off an rpm file then you are in business.

On the machine that has it:

rpm -q usernet

If you get an answer, that means it came off of one of the install cd's or some other kind of rpm distribution site.

Find the rpm download it to the target machine, run rpm -i usernet.whatever and it will list the requirments for install.

I once played to copy files game with ssh one machine to another. I could not exchange public keys after that stupid trick and eventually redid the entire OS on the machine I'd jacked with.

So unless I have source to compile or rpm's I have learned my lesson concerning file copy binary installations.

Good luck. If you find rpms or source, let us know, sounds like an interesting utility.

I will look at tucows and download.com and let you know if I find anything.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Balaji N
Honored Contributor

Re: Finding depends

hi,
since you are having redhat and assuming that you have installed from the rpms rather than compiling from sources, the easiest way to find out where this binary came from is as below.

rpm -q --whatprovides

and regarding this usernet program, here is the info.
+++++++++++++
$rpm -q --whatprovides /usr/bin/usernet
rp3-1.1.4-4

$ rpm -qi rp3
Name : rp3 Relocations: (not relocateable)
Version : 1.1.4 Vendor: Red Hat, Inc.
Release : 4 Build Date: Thu 31 Aug 2000 01:36:08 AM IST
Install date: Wed 01 Aug 2001 08:56:56 PM IST Build Host: porky.devel.redhat.com
Group : Applications/System Source RPM: rp3-1.1.4-4.src.rpm
Size : 557559 License: GPL
Packager : Red Hat, Inc. <>
Summary : The Red Hat graphical PPP management tool.
Description :
The rp3 program provides an easy-to-use interface for configuring
PPP connections, and for activating and monitoring any type of
network configuration. rp3 includes a GNOME panel applet,
a more highly functional replacement for usernet, and a graphical
configuration tool that takes you through the process of setting up
a PPP connection from start to finish, one step at a time.
+++++++++++++

Hope this helps. And I would suggest to install from rpm than copying files.

-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
John Meissner
Esteemed Contributor

Re: Finding depends

Thanks everyone - that worked perfectly
All paths lead to destiny
david_69
Advisor

Re: Finding depends

I like this:

$ rpm -qf /bin/sh
bash-1.14.7-22
$
fall down seven time stand up eight