How do you install *.tar.gz packages?
I'm having problems installing *.tar.gz, *.tar.Z, and *.zip packages.
How are these supposed to be installed? I need information regarding the correct installation path, correct installation tools, etc. Additional information would greatly help-- especially tips. By the way, I'm just new to Linux and I use Slackware. Thanks! |
The only tool you need is a command line.
tar -xzvf filename ./configure make su make install If you have any problems, you'll need to check the scripts and see if you can edit anything - such as your libraries being in a weird place when the script expects them somewhere else, but that's rare and you should be okay in Slack. Of course, you may not have the libraries and whatnot needed, but then just download them and start the process over again. Good luck. - Sorry. Dain bramage. Somebody in a thread I was just reading was using Slack. Duh. |
man tar
Seriously, it will help you out ALOT. If that doesn't do it for you, check out the following: http://www.linuxquestions.org/questi...threadid=45094 It's a really good thread on installing from source. BTW, any package that ends with .tgz is a package designed for Slackware and they are also known as Slackpacks. Oh, and I've yet to see a *.zip file in Linux, so I can't tell you anything about them. Hope this helps you out.:D |
man tar is hopeless, but that's ok, cos you only need to remember the magic letters xzvf (change s to a j if the file is a .tar.bz2 instead of a .tar.gz).
cd then into the directory just created. the do as shown above, (configure, make, make insatll) |
Quote:
:) |
Quote:
extract, which is always needed if you are extracting data from a tarball. If you have a file that has been gziped and would like to gunzip it, you use the "z" option. For differing versions of tar, the bzip2 option is either "y" or "j". READ THE MAN PAGE!!! |
Troubleshooting?
Excellent advice!
Now could someone please discuss the best methods of dealing with missing libraries. I'm trying to install a package that complained that libz was missing when I did ./configure, fair enough, I installed the zlib package and then it can't find zlib.h (I think, I'm not at my computer right now) which I'm pretty sure is included in the zlib package I installed. So would be very grateful if someone would explain how to deal with situations like these in general terms. How do I find the libs if they are on my system? How do I tell configure where to find them, symlinks? command line options? edit the configure script? I'm using Mandrake 9. Please be gentle, I am quite new to Linux... |
you are most likely having problems installing because of missing dependencies... make sure you have all the progs that the application you are trying to install requires.....i usually download from freshmeat.net and they list all the dependencies for the softwares...
usually configure scripts are best left alone since they will make sure that the software you are trying to install will run without fail all the time....but IF YOU REALLY KNOW WHAT YOU ARE DOING or a risk taker (like me)...then i guess you could always change the configure script and remake it using autoconf command... |
mrg: Another bit of advice about the dependencies is that when you compile from source, check to see if you have the development packages for those dependencies...
For example, if a certain app needs the XDelta libraries or something...make sure you also have the XDelta-devel package installed or it will say "not found" when you configure... This isn't ALWAYS the case...but whenever I try and compile something and it says it can't find something I KNOW is installed, the first thing I check is if I have the -devel package installed. Usually that's it... The second thing I check is ld.so.conf in /etc for the paths to the libraries (just google around for more on that) Another tip....sometimes ./configure --help or -h will give you some interesting info. |
Did someone say man tar? :D
|
Ok. That helped a lot. Where (in what directory) should the package be in the first place before extraction?
|
I think most people do /usr/local/src but I have ~/lab - like a laboratory where I experiment and blow stuff up. :D
|
If you store the package in /usr/local/src, won't it extract the package in that directory (e.g. /usr/local/src/package_name)?
Also, does it mean that I can install any package in any directory? Somebody told me that /usr/local is already near to obsolete. Is that true? |
a laboratory, lol.
This what I do....I download the file into my ~/dlds folder. Then i go into my /usr/src and run the tar command tar -zxf /home/me/file.tar.gz cd file less INSTALL,README,etc etc etc About the install part. There are two kinds of installs (that i know off). First is just a regular where the binaries go into the binary folder/s, the man pages go into the man pages folder/s, etc. To uninstall the program you go back into the source directory and run a 'make uninstall' (That is IF that program has that). If not you can just run a 'make install' again and look where everything went a manually delete it. Then there is a directory install where everything goes into one folder. To uninstall the program you just delete the folder. Most times its the first one, but you can choose a directory install every time (again, that was a "i think") by doing. ./configure --prefix=/where/you/want/it |
*g*
Yeah - you can delete the zip and keep the source if you're going to do some hacking or delete the source and keep the zip if you need room - or delete both or keep both. I'm not sure what you mean by install any package in any directory. You can put the tar.gz anywhere and the scripts will send the stuff to their places. And you can change that by modifying the scripts, but there's generally no reason to. I think maybe you *are* supposed to use /opt or something but /usr/local's still by far the most common thing. I'm not sure if /usr/local meets the File System Hierarchy specs or not. |
All times are GMT -5. The time now is 11:31 AM. |