LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   library srgp (https://www.linuxquestions.org/questions/programming-9/library-srgp-373577/)

csst0136 10-16-2005 08:10 AM

library srgp
 
i have package srgp.tar.Z and srgp.tar.gz but i dont know how to install it on suse 9.3 or Solaris.Please help me!!

Quigi 10-17-2005 11:28 AM

I don't know sgrp. So all that follows are guesses.

Often you get source code as a tarball. Assuming that's the case, the typical steps are
Code:

tar xvzf sgrp.tar.gz
cd sgrp
./configure
make test
sudo make install

This is assuming a nice and trustworthy packager.

A nice package will unpack into a subdirectory sgrp. But it could also be sgrp-1.0. Or no subdirectory at all -- that's not frequent, but it happened to me, and when everything spills out into your current directory, it's a big mess. So when you're not sure, first check (tar tzf sgrp.tar.gz), or create a new directory and cd to that.

Many tarballs were made with autoconf, and they contain a script "configure", which you run after unpacking. It will determine your machine's software environment (e.g., does it have gcc?) and create an appropriate makefile. Of course if your enemy prepared sgrp.tar.gz, it could do something completely different :eek:
Maybe there is no configure. Maybe there's a makefile. In that case, you can try and skip to the next step, building the code. But maybe there is no makefile and no source, just a library file (e.g., libsgrp.a). You could link your code with that, and if it works, install it, e.g., in /usr/local/lib.

Make will should build the library, typically by compiling source files (and maybe archiving them) and test it. Maybe there is no target "test", in which case you'll get a message like "Don't know how to make test" or "make: *** No rule to make target `test'. Stop.". In that case, just try "make" with no arguments.

Finally, "make install" should put the finished library into a place where linkers look, like /usr/local/lib. As normal users typically cannot write there, you must run this step as root, which is accomplished by "sudo". Of course you want to be careful what you run as root. If you don't trust the makers of sgrp (and even if you do), it would be a good idea to look in the makefile and see what target install does.

Good luck, and let us know how far you get.


All times are GMT -5. The time now is 03:00 AM.