PDA

View Full Version : linux lib



heni72847
03-12-2003, 09:58 PM
if a rpm needs files.. can u simply copy the needed files into whatever folder it is supose to be in
would that work?? so i don't have to install a whole library

Jen C
03-12-2003, 10:30 PM
Can you give an example of what is missing for what program? Specific error message would be great. This can make a difference to what advice you will get and the Linux guru's (not me :p) can point you in the right direction.

However if you are getting messages that tell you that required dependencies are missing, you generally you look up the missing dependency for more details (Google is great), see whether you already have it on your installation disk (or as part of another package) and if not, find the appropriate rpm file/version off the net from reputable sites and install it first. It will run off and put all its files into the correct directories automatically. Then try installing your rpm.

If you are using the graphical RPM program to install your package, try opening up a Terminal window in the directory where the rpm is saved, su to root (not su -) and enter this:
rpm -Uvh packagename.i386.rpm --test

This will do a dummy-install practice run and inform you of any possible problems and missing dependencies.

If you start getting the rpm run-around from missing dependencies, you might want to consider compiling it yourself from source files.

Chilling_Silently
03-12-2003, 11:02 PM
> Can you give an example of what is missing for what
> program? Specific error message would be great.
> This can make a difference to what advice you will
> get and the Linux guru's (not me :p) can point you
> in the right direction.

You'd be surprised with the great advice you do offer Jen :-) Dont be so harsh on yourself....

> However if you are getting messages that tell you
> that required dependencies are missing, you generally
> you look up the missing dependency for more details
> (Google is great), see whether you already have it on
> your installation disk (or as part of another
> package) and if not, find the appropriate rpm
> file/version off the net from reputable sites and
> install it first. It will run off and put all its
> files into the correct directories automatically.
> Then try installing your rpm.

Im going to vouch for google again, just coz I can... :p
If it says something like this (Like GAIM did for me when using Slackware/Redhat and I was compiling):
Missing libnss.so.0
Then google for:
rpm libnss download

> If you start getting the rpm run-around from missing
> dependencies, you might want to consider compiling it
> yourself from source files.

Yes.. Its much easier.. Isnt it Jen ;-)
Just make sure you install the relevant devel files for your distro :-)

A description of the error (the last 10 lines are usually a good indication and most helpful to others....) and what you're trying to do will help :-)

Short Answer:
You can

Long Answer:
You can, but is it really worth it, when chances are if you're missing one shared lib file, that there will be others (which will likely be included all in one rpm file). Aside from that, there's a number of places to put it, and chances are the program wont check all of them for the lib file....

Hope this helps


Chill.

bmason
03-12-2003, 11:51 PM
The main function of RPM (and equivilants, eg dpkg) is to keep a database of all the software installed on your system (and what versions etc). These package management systems are the main reason linux installs do not suffer "bitrot" (aka. reinstalling windows every 12 months). Although you have also met the down side, dependencies.

To work properly the database used by RPM needs to be accurate. By just copying the file over directly the RPM database will not be updated so it will not know about the new file and you will get the same dependency error. And in the worse case, if you overwrote an existing file, other packages that need the file may stop working.

There are a number of extensions to the basic package management systems to handle the dependency problems too. eg mandrakes URPMI, and debians APT-GET. If your distro includes one, try using it to install the package because it will know what other packages to install (hopefully).

heni72847
04-12-2003, 07:25 AM
oh... so... when i try to install a rpm and it says it needs
libcups.so.2
libattr.so.1.0.0
libreadline.so.4.3
libss.so.2.0

i can't just get them from my other comp and copy them to /lib folder or where ever it's supose to go,...because the comptuer doesn't know i've put those files there??...

not sure if i got the right idea...

Chilling_Silently
04-12-2003, 09:54 AM
That's better then...

Now we have something to work with.. :-)

I simply took each line you posted and added "rpm download" and threw that into google and came up with:
libcups.so.2

This is the Cups printing server..... Have a look on your Distro's CD's

Libattr
Again, this should be on your Distro's CD's... I know Redhat has it and the devel files, but just in case:
http://rpm.pbone.net/index.php3/stat/4/idpl/843349/com/libattr-2.4.1-2.i386.rpm.html


libreadline:
http://rpm.pbone.net/index.php3/stat/4/idpl/804076/com/libreadline-java-javadoc-0.8.0-5jpp.i686.rpm.html


libss is (AFAIK) something for support for the Ext2 File-system.. bit odd, Im sure your kernel would have everything it needs.. but never mind:
http://www.flyn.org/projects/libss/download.html

Hope this helps


Chill.

Graham L
04-12-2003, 01:25 PM
The libraries are carefully arranged, and just putting the files into /lib is a Very Bad Idea. :D

If you have a look with ls -l /lib you will see that there are a lot of files with long names ... the number parts showing major version/minor version/patch level/family ... and some with shorter names which are symbolic links to the longer-named files. This is so that programmes can always "know" the names for the libraries they use, despite later improvements to the libraries which would result in new names. (Another OS has libraries called "DLL"s, which keep the same name through different versions. I believe this causes unhappiness from time to time).

There is more. ;-) When a new version of a library is installed by using the package (RPM, deb) a script is part of the package and is run after the files have been unpacked. It makes any new symbolic links needed, and runs the library manager programme ldconfig which updates various tables so that the OS knows what is what and who it's doing it to. When you unpack a tgz source of a library and compile it yourself, the make routine has a "make install" step which does all this too.

So if you want to put in one file you are trying to undo the hard work of some very clever people.

That's the bad news. Now for the good news. :D

I have been annoyed by the dependency errors too, for a long time. I noticed that Mandrake's GUI RPM installer was automatically finding and loading the extra packages. I'm scrapping Mandrake on the two machines I put it on, but that's one thing I like. I've been browsing through the new edition of an O'Reilly book of Linux and found that IT'S PART OF RPM. Use rpm --aid -ivh thefile.x.y.-z.rpm and it will install the extra packages. :D :D :D :D :D

Chilling_Silently
04-12-2003, 01:32 PM
That's why Portage is so cool :D ;-)

heni72847
04-12-2003, 02:14 PM
um.. just not sure here....
i installed the rpms but then samba still wont' install...

i can get the needed files off another computer but when i copy it on to this computer the rpm doesn't seem to notice that the file is there...

is there a way to get this working??

Chilling_Silently
04-12-2003, 02:19 PM
Two things:
Try running ldconfig as root
If the rpms are giving you the run-around, then compile it from source... Samba's dead easy :-)

Graham L
04-12-2003, 02:27 PM
I wouldn't recommend trying to beat the system. If RPM won't load something because of a dependency problem, there is a problem. Running ldconfig probably won't do any harm ... but it won't help if you ahve used rpm to install the libarrioes. ;-)

Try rpm --aid -ivh samba*.rpm . (Of course, you must be root to do the installation).

If that doesn't work, post the error messages. It's impossible to help without information.

heni72847
04-12-2003, 02:45 PM
oh.. sorry.. didn't read the new posts properly...
um.. --aid doesn't work... it doesn't seem to have that option...

Graham L
04-12-2003, 05:31 PM
Damn. I found that in a reputable book ... latest edition ... and thought my dreams had come true. Check with man rpm and see if it's something different. :D

Jen C
04-12-2003, 06:17 PM
>I've been browsing through the new edition of an O'Reilly book of Linux and found that IT'S PART OF RPM. Use rpm --aid -ivh thefile.x.y.-z.rpm and it will install the extra packages.

Would this be the O'Reilly "Linux in a Nutshell" - A Desktop Quick Reference 4th Ed? :D

I have just got this book as well (in an ever hopeful attempt at understanding a bit more :p) and it does mention the --aid option.

However a bit of a google later, seems to suggest you might need to do a bit of preparation before hand - see this query here (http://groups.yahoo.com/group/rpm-list/message/19882) and the follow up posts.

Chilling_Silently
04-12-2003, 07:22 PM
Graham>
I only suggest that as the samba source code comes with all it needs... Ive had a few dependancys go missing with Samba RPM's myself.. Source solved that..

Same with MPlayer... Aye Jen ;-)

Graham L
05-12-2003, 10:39 AM
Linux ina Nutshell is the book. :D The version of RPM (4.2) in the RH9 I've got has the --aid option "in the man", and doesn't give an error when it's used. It just doesn't do anything. :_|

I've heard that apt-get (a Debian tool, but can be used in RPM based distrioutions) is a great way to go --- PC Authority had ana article on it some time aga, but I never bothered ... I just think this is a mild nuisance.

I found a good short article ... (I suspect a ChCh guy ;-)) both on using apt-get, and the official RPM way to resolve the problem by giving "handling rpm dependency" will get it as the first link, to save me mistyping the url. (As a check, the site is www.brandonhutchinson.com .)